joining str_replace with strtolower
Simple one hopefully, is there a way I can use strtolower and str_replace together. At the moment I am changing the value of a variable and declaring it seperately, and thought if i could do this together it would be more efficient?
$afixteam = str_replace开发者_如何学Python(" ","-",$fixData['ateam_name']);
$afixteamlink = strtolower($afixteam);
Thanks.
this should do it. You can run methods within methods as follows, condensing to a single line.
$afixteam = strtolower(str_replace(" ","-",$fixData['ateam_name']));
$afixteam = strtolower(str_replace(" ","-",$fixData['ateam_name']));
How you would with most things.
精彩评论