Hello, I have got a function, i do not know how to use it. can anybody help me. Thanks function removeSmallWords($baseString){ $toReturn = ""; $wordArray = spliti(" ", $baseString); foreach ($wordArray as $word) { if(strlen($word) >= 3){ $toReturn .= $word . " "; } } return $toReturn; } PHP: I want to use this function on $title
echo removeSmallWords($title); or add it in a variable that you can later use .. $words = removeSmallWords($title);
Thank you. $words = removeSmallWords($title); PHP: worked perfect. I have got another question. I have got many other functions. How can i use them all once instead of using one by one. Thanks
I mean I have got different functions and if i want to use them one by one i need to do this $words = removeSmallWords($title); $words = anotherfunction($title); $words = anotherfunction($title); $words = anotherfunction($title); $words = anotherfunction($title); ... ... PHP:
no you can edit your first function and add a call to the other functions .. or better make a functions that calls all functions function call_All($words) { $returnedvalue = function1($words); $returnedvalue = functuon2($whatever); .... return $returnedvalue; }
Or just build all those functions into a main one? Would probably mean each individual function could be rewritten too.