Please help me to put these words of string into some specific variables.
$remove4 = "First 1st, Second 2nd, Third 3rd, Fourth 4th";
i'm using this code, but i can get it right. can somebody tell me what is the problem in my code?
$str = (explode(",",$remove4));
$check = array();
for($i=0;$i<=$count;$i++){
$check[] = $str[$i];
}
foreach($check as $value){
echo $value . "<br>";
$var=(explode(" ", $value));
echo $var[0];
echo $var[1];
}
Goal:
Process1 = 'First';
Process2 = 'Second';
Process3 = 'Third';
Process4 = 'Fourth';
Temp1 = '1st';
Temp2 = '2nd';
Temp3 = '3rd';
Temp4 = '4th';