PHP numeric for each with substr_count -


okay let me simplify..

i have list of ids in variable $paramsid = 10,38,8,4,36,.. need separate these numbers separate variables used list($slide1, $slide2, $slide3, $slide4, $slide5) = explode(",", $params->get('id')); placed in array:

$a = array(     "one" => $slide1,     "two" => $slide2,     "three" => $slide3,     "four" => $slide4,     "five" => $slide5 ); 

and gets put foreach statement:

foreach ($a $k => $val) {     $args = $val;     $item[] = modarticleslider::getarticles($args); } 

all trying achieve foreach number in $paramsid separate values "," , place each seperated value variables named "$slider1, $slider2(and forth)" place variables in array.

any appreciated.

just use

$a = explode(",", $params->get('id')); 

then try print_r($a) , check if values in array.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -