php - Combining Results into a single variable -


i have foreach loop in php script exports results need.

i have these result combine 1 variable rather printing each result me. don't know function of i'm trying called,

but know goes this:

   if($mins) {       $ips .= $item++;    } else {       $has .= $item++;    } 

therefore, want print out $items $mins this:

"$item $item $item $item $item" 

i want $ips equal/hold entire "$item $item $item $item $item" not singular.

any kind of can on appreciated!

similarly can

$ips = null; $has = null; foreach ( (array) $arr $key => $val){ if ($mins){     $ips .= $key; }     $has .= $key; }     $i++; } 

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 -