Hello! Is there any short method for parsing a string to an array? $str = " 'red','green','blue' "; I want to receive the following: $arr = array ('red', 'green', 'blue'); Thank you!
$str = " 'red','green','blue' "; $arr = array_map('trim', explode(',', str_replace("'", '', $str))); PHP: That should work, assuming the original string is in that format...