Beginner Help
Posted: Thu Aug 19, 2010 10:29 am
Hi folks -
I have a question with string manipulation. I'm new to PHP, hence any help you provide will be appreciated.
I have a string that looks like this:
$str = 'active|b:1;loans|i:2;name|s:12:"Abcd Efgh";email|s:17:"abcd@efgh.com";ip|s:14:"111.110.11.111"';
I want to extract each value separately.. for example:
name= "Abcd Efgh"
email="abcd@efgh.com"
I started using explode, but I'm sure there is a better function to split this string. Any ideas ?
I have a question with string manipulation. I'm new to PHP, hence any help you provide will be appreciated.
I have a string that looks like this:
$str = 'active|b:1;loans|i:2;name|s:12:"Abcd Efgh";email|s:17:"abcd@efgh.com";ip|s:14:"111.110.11.111"';
I want to extract each value separately.. for example:
name= "Abcd Efgh"
email="abcd@efgh.com"
I started using explode, but I'm sure there is a better function to split this string. Any ideas ?