How can I split a string at the first occurrence of - (minus sign) into two $vars with PHP?
I have found how to split on every \"-\" but, not only on the first occur
$array = explode('-', 'some-string', 2);
Then you could do $var1=$array[0] and $var2=$array[1].
$var1=$array[0]
$var2=$array[1]