Here is what i have in php :
I need to do explode the given variable
$a = \"hello~world\";
I need to explode as
$first
If you know the number of variables you're expecting to get back (ie. 2 in this case) you can just assign them directly into a list:
list
list($first, $second) = explode('~', $a); // $first = 'hello'; // $second = 'world';