Code: Select all
andCode: Select all
tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi,
I have this piece of code which i am getting the below dataCode: Select all
session_start();
$ArrayList = array("_GET", "_POST", "_SESSION", "_COOKIE", "_SERVER");
foreach($ArrayList as $gblArray)
{
$keys = array_keys($$gblArray);
foreach($keys as $key)
{
$$key = trim(${$gblArray}[$key]);
}
}Code: Select all
for ($x = 0; $x < $items; $x++)
{
$qty = "qty";
$units = "units";
$color = "color";
${$qty.$x};
${$units .$x};
${$color .$x};
}So it might come out like:
Code: Select all
3 pens blue
5 gloves brown
and so onCode: Select all
$string = ${$qty.$x} . " " . ${$units .$x} . " " . ${$color .$x} . "<br>";How can I get all loops into one string?
Thanks![/i]
feyd | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]