note 49118 deleted from function.explode by didou
| From: | didou@php.net | Date: | Mon, 17 Jan 2005 12:12:12 +0000 |
| Subject: | note 49118 deleted from function.explode by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-83494@lists.php.net to get a copy of this message | ||
Note Submitter: whiskez
Reason: useless example
----
here is a way for exploding a variable and get it to an array. For example you could hang on a word
onto this array
<?php
$var="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15";
$var1=explode(" ", $var);
foreach ($var1 as $value)
{
$var2[]=$value." Frank";
}
echo "<pre>";
print_r($var2);
echo "</pre>";
foreach ($var2 as $value)
{
echo ($value)."<br>\n";
}
?>