Oh I see now. Okay what you are going to want to do in the codeorsomethingfunction is instead of echo use return. So return '1 + 2 = 3'; I think thats what you are looking for.
Is it also possible to include things like functions in it or questions like: if(1=1) { echo '1 = 1'; } so it does not only replace words but it can also place big codes?
oic so if(something){replace with this data}else {this data}? I would just make an if statement, and set elements in the values array accordingly. if(this){ $values= array("somin","somin")}else {$values = array("somin","somin")} Does that help?
if you use arrays, why don't you use key=>value pairs? You use $settings array and then use $values array... is easier to use only one array. $settings = array('title'=>'Website - Home', 'page_title'=>'Home'.....); and function header($settings) { foreach( $settings as $setting => $value ) { .... } } much cleaner...
haha thx a lot dude :D could've done that myself but totally forgotten :D.
Just FYI, this -> is called the arrow operator
Oh I see now. Okay what you are going to want to do in the codeorsomethingfunction is instead of echo use return. So return '1 + 2 = 3';
I think thats what you are looking for.
Is it also possible to include things like functions in it or questions like:
if(1=1) {
echo '1 = 1';
}
so it does not only replace words but it can also place big codes?
Could you elaborate on that? I'm not quite sure what you mean by that.
oic so if(something){replace with this data}else {this data}? I would just make an if statement, and set elements in the values array accordingly.
if(this){ $values= array("somin","somin")}else {$values = array("somin","somin")}
Does that help?
Indeed, skype name is NardCake.
if you use arrays, why don't you use key=>value pairs?
You use $settings array and then use $values array... is easier to use only one array. $settings = array('title'=>'Website - Home', 'page_title'=>'Home'.....);
and
function header($settings) {
foreach( $settings as $setting => $value ) {
....
}
}
much cleaner...
How do I create while loop
And is there a way to contact you?
by skype or something?