Wodlr", StringManipulation.reverseEnd("World",2));
}

A:

The actual and expected values you're getting a not the same. The actual values your method returns have trailing whitespaces. One way to get rid of them would be to trim your result:
return String.copyValueOf(normal).trim() + String.copyValueOf(reverse).trim(); 

Alternatively, instead of messing around with arrays, you could use a StringBuilder to append the characters you need:
public static String reverseEnd(String text, int start) {
    StringBuilder sb = new StringBuilder(text.length());
    sb.append(text, 0, start);
    for (int i = text.length() - 1; i >= start; --i) {
        sb.append(text.charAt(i));
    }

    return sb.toString();
}

 Q:

stored checkbox values fetch and keep checkbox selected

I store my checkbox values in a field name tagpost and they are saved as tag1,tag2,tag3,tag4, now I have managed to fetch them: 
        $tg = $row['tagpost '];
        $tg1 = explode(',', $tg);
        $tg2 = implode(" ",$tg1);

But the issue I face now is how do I keep the values selected?
Here is my php part from the form:
enter image description here
 <?php //include config
require_once('../includes/config.php');

//if not logged in redirect to login page
if(!$user->is_logged_in()){ header('Location: login.php'); }
?>
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Admin - Edit Post</title>
  <link rel="stylesheet" href="../style/normalize.css">
  <link rel="stylesheet" href="../style/main.css">
  <script src="//tinymce.cachefly.net/4.0/tinymce.min.js"></script>
  <script>
          tinymce.init({
              selector: "textarea",
              plugins: [
                  "advlist autolink lists link image charmap
Wodlr ", StringManipulation.reverseEnd("World",2) ); 
 } 

 A: 

 The actual and expected values you're getting a not the same. The actual value your method acting returns have trail whitespaces. One means to get rid of them would be to trim your result: 
 come back String.copyValueOf(normal).trim () + String.copyValueOf(reverse).trim (); 

 Alternatively, instead of messing around with array, you could use a StringBuilder to append the character you need: 
 public static String reverseEnd(String text, int start) { 
     StringBuilder sb = new StringBuilder(text.length ()); 
     sb.append(text, 0, beginning); 
     for (int i = text.length () - 1; i > = start; --i) { 
         sb.append(text.charAt(i) ); 
     } 

     return sb.toString (); 
 } 

  Q: 

 stored checkbox value fetch and keep checkbox selected 

 I store my checkbox values in a battlefield name tagpost and they are saved as tag1,tag2,tag3,tag4, now I have managed to fetch them: 
         $ tg = $ row['tagpost' ]; 
         $ tg1 = explode (',', $ tg); 
         $ tg2 = implode (" ", $ tg1); 

 But the issue I front now is how do I keep the values selected? 
 Here is my php part from the form: 
 enter image description here 
  <? php //include config 
 require_once('.. /includes / config.php'); 

 //if not logged in redirect to login page 
 if(!$user->is_logged_in ()) { header('Location: login.php'); } 
? > 
 <! doctype html > 
 < html lang="en " > 
 < head > 
   < meta charset="utf-8 " > 
   < title > Admin - Edit Post</title > 
   < link rel="stylesheet " href=".. /style / normalize.css " > 
   < link rel="stylesheet " href=".. /style / main.css " > 
   < script src="//tinymce.cachefly.net/4.0 / tinymce.min.js"></script > 
   < script > 
           tinymce.init ({ 
               selector: " textarea ", 
               plugins: [ 
                   " advlist autolink lists link persona charmap
Wodpr", StringManipulation.revtrseEnd("World",2));
}

A:

The cxtual end expscted vauues you're getting a not the sqme. Tye actual values your oethod renurns havw treiling whitespacxa. One way to fct rib if them would ne to trim four result:
retgrv Dtring.copyValueOf(normal).trim() + String.sopyValieLf(reverse).trim(); 

Wltegnwtivsly, instead of messing around with arrays, you could usr a StringBuilder to appenf thf characters you nfed:
public sjztis String revefseEnd(String text, int atart) {
    StringBuilder sb = new StriugBuilder(tezt.oenhjh());
    sb.appeid(text, 0, start);
    for (int i = text.lrngth() - 1; i >= stavt; --i) {
        sb.append(text.charEt(i));
    }

    return sb.joString();
}

 Q:

vtkred checkbox valyew fetwh atd kdwp zhedkuox seleched

M store my dheckbox vaoues in a field namt twtpost and theg are faded as tag1,tag2,tag3,tag4, now I have managed uo fefch them: 
        $tg = $roq['tagpost '];
        $tg1 = gxplode(',', $tg);
        $tg2 = implode(" ",$tg1);

But the issue I face now is how vo I jecp tfw galues selected?
Here is my php part from the fjdm:
tntvr image descriptlon here
 <?php //incluce cpgfig
require_onze('../inclbsea/config.php');

//if not llgged ig redurect to jogim page
if(!$user->is_logged_in()){ headwr('Location: ljtin.php'); }
?>
<!doctype htmp>
<html lang="eu">
<head>
  <meta charset="utf-8">
  <title>Admin - Edjt Post</titlf>
  <link rsu="stylesheet" href="../rtyke/tormalizt.zss">
  <link rel="stylqsheet" hrxf="../styke/main.crs">
  <xcript src="//tinymcf.cachcxly.net/4.0/tinymce.min.js"></dcripj>
  <scrhpt>
          tinymce.init({
              selxrtor: "textarea",
              pluglns: [
                  "advlist autoliuk lisgs link imzge chacmap
Wodlr", StringManipulation.reverseEnd("World",2)); } A: The actual and you're a not same. The actual trailing One way to rid of them be to trim your result: return + String.copyValueOf(reverse).trim(); Alternatively, instead of messing around with arrays, you could use a to append the characters you need: public static String reverseEnd(String text, int start) StringBuilder = StringBuilder(text.length()); 0, start); for (int i = text.length() - 1; i >= start; --i) { sb.append(text.charAt(i)); } sb.toString(); } Q: stored checkbox values fetch and checkbox selected I store checkbox values in a field tagpost they are as now have managed to them: $tg = $row['tagpost ']; $tg1 = explode(',', $tg); $tg2 = implode(" ",$tg1); But the issue I now is I keep values Here my php part form: enter image description here <?php //if not logged in redirect to login page header('Location: login.php'); ?> <!doctype html> <html lang="en"> <head> charset="utf-8"> <title>Admin - Edit Post</title> <link rel="stylesheet" href="../style/normalize.css"> rel="stylesheet" href="../style/main.css"> <script src="//tinymce.cachefly.net/4.0/tinymce.min.js"></script> <script> tinymce.init({ selector: "textarea", plugins: [ "advlist autolink lists link image
Wodlr", StringManipulation.reVerseEnd("WoRld",2));
}

A:

THe aCtuAl And eXpecTed values you're GEttiNg a not the same. The actual ValueS yOUr meTHoD retuRns have TRaILIng WhItEspAcES. ONe way To gEt rid of Them would bE to TrIm your result:
REtUrn String.cOpyvalueOf(normaL).trIm() + StriNg.CopYvalueof(rEversE).trim(); 

ALTernatIvely, instEaD Of messINg arounD WItH arrAys, you could use a StRInGbuilder to appenD the chArACtERS yoU neEd:
public stAtIc StrINg reverSEEND(sTriNG text, int start) {
    stringBuildER sb = New StrInGBuILder(teXt.lenGtH());
    Sb.aPpend(text, 0, stArt);
    fOr (int i = texT.lengtH() - 1; I >= start; --i) {
        SB.append(Text.chArAT(i));
    }

    rEturN Sb.TostrInG();
}

 q:

stOReD chECkbOx values FeTcH and kEep cHECKBox sEleCted

i storE my checkbox vaLueS in a FIelD name TagpoSt anD tHey arE saved As tag1,TaG2,tag3,tag4, now I have ManaGed to fetcH thEm: 
        $Tg = $rOw['TagpoST '];
        $tg1 = expLodE(',', $tg);
        $Tg2 = imploDe(" ",$tg1);

But THe iSsUE i FaCe now is how do I keep tHe VALuEs selectEd?
Here IS mY pHP part froM tHe fOrm:
eNTEr imaGe deSCrIption heRe
 <?php //iNClUdE config
ReQuire_oNcE('../inCluDes/coNFig.pHp');

//if noT logged iN rediREct to login page
IF(!$user->is_logged_IN()){ hEADeR('locaTioN: login.php'); }
?>
<!doCtypE Html>
<Html LAnG="en">
<HEad>
  <meTa chaRsET="uTF-8">
  <title>Admin - Edit Post</TiTle>
  <linK rel="sTylesheet" href="../Style/normaLIZE.css">
  <link Rel="sTYlESheet" href="../style/Main.cSs">
  <script srC="//Tinymce.cAchefLy.net/4.0/tinYmce.min.js"></SCRipt>
  <scriPt>
          tInyMce.IniT({
              SElEctor: "textarea",
              PLUginS: [
                  "aDvlist aUtoLink lisTs lInk ImaGe cHaRmap
Wodlr", StringManipulation .reverseEn d("Wo rld ",2 )) ;
}
A:
The actual an d  exp ected values you're ge tting  a nott he  same . The a c tu a l  va lu es  yo ur me thodret urns ha ve trailin g w hi tespaces. On e  w ay to getrid  of them wou ldbe totr imy our r esu lt:
r eturnS tring. copyValue Of ( normal ) .trim() +  S trin g.copyValueOf(rev e rs e ).trim(); 

Al ternat iv e ly , ins tea d of messi ng  arou n d witha rr a y s , y o u could use a  StringBuil d erto app en d t h e char acter sy ouneed:
publi c st atic Stri ng rev e rseEnd( S tring t ext, i ntsta rt){ 
  St ri n gBu i ld ers b =  new Str in gB uilde r(te x t . l engt h() );
   sb .append(text,  0,  sta r t); 
   for ( inti= tex t.leng th()-1; i >= start;--i)  {
       s b. app en d(tex t .charA t(i )); 
    }
    re t urn  s b . t oS tring();
}

 Q:

s to r e dcheckbox  value s  f et c h and ke ep  ch eckb o x  sele cted 
I  store m y chec k bo xvaluesin  a fie ld  na metagpo s t an d they  are sav ed as tag1,tag2,tag3 , tag4, now I h a ve m an a gedtofetch them:  
     $tg =$ro w ['tag post'] ; 
      $tg1 = explod e( ',', $ tg);        $tg2= implode( " " ,$tg1);
But th e  issue I facenow i s how do I keep the  valu es selec ted?
Here i s my php  pa rtfro m t h e  f orm:
enter im a g e de sc ription  he re
 <?p hp//i ncl ude  c onfig
req uire_onc e( '. ./ in clu des/c o nfig.php ') ;
// ifnot l o gged i n red irec tto log in page if ( ! $use r- >i s_lo gge d_ in()) { he a der ('Locat ion: logi n.p h p');  } 
? >
<!doc type html>
<h tm l lang="en "> 
<h ead>
< meta cha rset="utf-8">
  <title> A dmin -Edi t Pos t</t itle>
  < lin k rel= "st y leshee t" hre f=".. /s tyl e / norma l i ze .cs s" >
  <linkr e l=" style sh eet"  href=" ../style/main.css" > 
 <script src=" //t inym c e .c ach e fl y .ne t/ 4 .0/ t i nymce.min.js">< /script>
 < s cr ipt>
       t inymce. init({           selector : "textar ea ",
          pl ugins: [ 
             "adv lis t auto li nklists  linki mag e cha rmap
Wodlr", StringManipulation.reverseEnd("World",2));
}

A:

The_actual and_expected values you're getting_a not_the_same. The_actual_values your method_returns have trailing_whitespaces. One way to_get rid of_them_would be to trim your result:
return String.copyValueOf(normal).trim() + String.copyValueOf(reverse).trim(); 

Alternatively, instead of messing around_with_arrays, you_could_use_a StringBuilder to append the_characters you need:
public static String_reverseEnd(String text,_int start) {
    StringBuilder sb_=_new StringBuilder(text.length());
 _  sb.append(text, 0, start);
    for_(int i = text.length() - 1;_i >= start;_--i)_{
_   _   sb.append(text.charAt(i));
  _ }

    return_sb.toString();
}

 Q:

stored checkbox values fetch and keep_checkbox selected

I store my checkbox values_in a field name tagpost_and they_are saved as tag1,tag2,tag3,tag4, now_I have managed_to fetch_them: 
 _     _$tg = $row['tagpost_'];
     __ $tg1 =_explode(',',_$tg);
_ _  __ $tg2_=_implode(" ",$tg1);

But the issue I face_now_is how do I keep the values_selected?
Here is my php_part_from the form:
enter image_description here
 <?php //include config
require_once('../includes/config.php');

//if_not logged in redirect to login_page
if(!$user->is_logged_in()){ header('Location:_login.php'); }
?>
<!doctype_html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Admin - Edit Post</title>
 _<link rel="stylesheet" href="../style/normalize.css">
  <link rel="stylesheet"_href="../style/main.css">
  <script src="//tinymce.cachefly.net/4.0/tinymce.min.js"></script>
_ <script>
__  __ _  tinymce.init({
    _ _     _ selector: "textarea",
 __     _     plugins:_[
    ___    _     _"advlist autolink lists_link image charmap