Thread: foreach help
View Single Post
Old 01-25-2013, 06:23 PM   PM User | #1
Clawed
New Coder

 
Join Date: Nov 2012
Location: United Kingdom
Posts: 29
Thanks: 3
Thanked 0 Times in 0 Posts
Clawed is an unknown quantity at this point
foreach help

Hi,

I'm coding a template system for my site with multiple themes and i need to know how to echo things like this:

PHP Code:
$replace "['data1','Hi there'],['data2','Hello there']"
I need to explode or something like that with [] as 1 array with 2 data sections.
It's like array but not.

I know how to replace in the site:
PHP Code:
str_ireplace"#data1#""value of data1" );
str_ireplace"#data2#""value of data2" ); 
Is just need to know how to make [] these in to 1 array.

Can anyone help.
Would be very helpful.

Thanks,
Clawed
Clawed is offline   Reply With Quote