PHP Template System

Поділитися
Вставка
  • Опубліковано 9 лис 2024

КОМЕНТАРІ • 12

  • @marthaarman
    @marthaarman 11 років тому

    haha thx a lot dude :D could've done that myself but totally forgotten :D.

  • @stormybear4986
    @stormybear4986 2 роки тому

    Just FYI, this -> is called the arrow operator

  • @FaceChap
    @FaceChap  11 років тому

    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.

  • @marthaarman
    @marthaarman 11 років тому

    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?

  • @FaceChap
    @FaceChap  11 років тому

    Could you elaborate on that? I'm not quite sure what you mean by that.

  • @FaceChap
    @FaceChap  11 років тому

    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?

  • @FaceChap
    @FaceChap  11 років тому

    Indeed, skype name is NardCake.

  • @JLaurel
    @JLaurel 7 років тому

    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...

  • @tonek78
    @tonek78 11 років тому

    How do I create while loop

  • @marthaarman
    @marthaarman 11 років тому

    And is there a way to contact you?
    by skype or something?