funnymoney
10-22-2009, 03:06 AM
You might consider this task easy or hard but i don't know, it just came cross my mind.
This is the task.
1) you have a variable that is a string $string ="aB%3C%'B\^B*3%5SDb";
2) extract numbers from string called $number
3) check those numbers with this solution $solution = "335";
if this structure echoes true you have a solution
if ((int)$number == (int)$solution) {
echo "true";
}
else{
echo "false";
}
first to solve gets thanks! :)
This is the task.
1) you have a variable that is a string $string ="aB%3C%'B\^B*3%5SDb";
2) extract numbers from string called $number
3) check those numbers with this solution $solution = "335";
if this structure echoes true you have a solution
if ((int)$number == (int)$solution) {
echo "true";
}
else{
echo "false";
}
first to solve gets thanks! :)