php - Different value in While loop -


i want 4 values while loop in different variables.for example want this

$var1 = "value1"; $var2 = "value2"; $var3 = "value3"; $var4 = "value4"; 

here while loop

while($rw = $oappl->row($rsimg))         {              //get value here              $var1 = $rw['thumb'];         } 

but no value can repeatable,i have thumb returned.

you cannot store more 1 value inside variable, can either echo while looping

while($rw = $oappl->row($rsimg)) {      //get value here      echo $rw['thumb'] . '<br>'; } 

or create new array use values later

$thumbs = array(); while($rw = $oappl->row($rsimg)) {      //get value here      $thumbs[] = $rw['thumb']; } 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -