I am eager to ask a php question online. thank you! Function number ($ str)
{
Preg_replace ('/\ D/S', '', $ str );
} Echo number ('text mosquito 38 ');
The extracted number $ asd = preg_replace ('/\ D/S', '', $ str); cannot be obtained.
Reply to discussion (solution)
Urgent request ~~~ Please help me.
Because your function does not return values.
Function number ($ str)
{
Return preg_replace ('/\ D/S', '', $ str );
}
Function number ($ str)
{
Return preg_replace ('/\ D/S', '', $ str );
}
Dear Moderator, how can I output the number 38 to $ asd = 38?
The function has no return value.
Function number ($ str)
{
Return preg_replace ('/\ D/S', '', $ str );
}
Dear Moderator, how can I output the number 38 to $ asd = 38? Is it the number after $ asd gets the output?
The function has no return value.
Can you perform the following operations? Return preg_replace ('/\ D/S', '', $ str); then I got a number, but how can I make $ asd = 38? Is it the number after $ asd gets the output?
Function number ($ str)
{
Return preg_replace ('/\ D/S', '', $ str );
}
$ Asd = number ('text mosquito 38 ');
Echo $ asd;
Function number ($ str)
{
Return preg_replace ('/\ D/S', '', $ str );
}
$ Asd = number ('text mosquito 38 ');
Echo $ asd;
Thank you !!!!!!!