Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

Passing an argument as opening and closing tag

$
0
0

Hey Guys.  I have a function below. When I call it I want to pass in an <response> opening tag and a </response> closing tag as one argument, instead of having 2 arguments for the closing tag and opening tag.

Is there a way where I can do this? Below is the function

// The function below is the for the say voice only
//@param $say_text takes a string as an argument for the say text
function say_verb($response = "",$say_text) {
    $output = "{$response}<Say voice=\"woman\">{$say_text}{$response}</Say>";
    echo $output;
    return $output;
     }
   

Pretty much when i call say_verb() I want to some how pass <response> and </response> as one argument


Viewing all articles
Browse latest Browse all 13200

Trending Articles