I want to be able to use implode to take the elements in an array and assign them to individual variables. Is this possible? I've done similar things in other languages, but haven't been able to figure this one out yet.
The output looks like this:
I'd like to be able to output the array contents to variables like skill1, skill2, etc.
Thanks!
Peter V.
Code:
//$skills = array('sql', 'perl', 'php', 'html');
$tagline = implode(' ', $skills);
for($i = -1; $i < count($skills); $i++)
{
echo "skill #$i = $skills[$i] <br />";
}
echo "List of Skills: $tagline";
The output looks like this:
Code:
skill #0 = sql
skill #1 = perl
skill #2 = php
skill #3 = html
List of Skills: sql perl php html shell perl jcl cobol
I'd like to be able to output the array contents to variables like skill1, skill2, etc.
Thanks!
Peter V.