I have following string:
productname#ptb#usage#pte#characteristic
=> as a result i want a result array like this:
$arrProduct["productname"] = productname
$arrProduct["usage"] = usage
$arrProduct["characteristic"] = characteristic
or a string like this:
productname#ptb#usage
=> as a result i want a result array like this:
$arrProduct["productname"] = productname
$arrProduct["usage"] = usage
$arrProduct["characteristic"] = ''
productname#pte#characteristic
=> as a result i want a result array like this:
$arrProduct["productname"] = productname
$arrProduct["usage"] = ''
$arrProduct["characteristic"] = characteristic
I guess the best way is to use RegExp. I have here RegexBuddy, but I have no idea where to start from...
Thanks for your help!