News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

PHP nooB question.

Started by kat, April 27, 2011, 10:31:58 AM

Previous topic - Next topic

kat

What, exactly, is the difference between

<body>';

and

<body>

If a mod looks for <body>'; and you make the edit after <body>, as <body>'; doesn't exist, I get errors.

So, what does the '; actually do?

sawz

i found that when trying to do a manual install of the ad mod and found this solution which may contain the answer you seek:

http://www.smfads.com/forums/index.php?topic=1930.0#post_ref3
keep smiling, they'll always wonder what your up too.....

texasman1979

The '; is the end of an echo statement in this case along with a line end identifier. The php interpreter sees the quote/simi colon and it knows that it is the beginning or end of sonething and performs actions programatically according to what is there. Example: echo 'hello world'; this if the only thing is present will give you a web page that says hello world. In a mods case, the search function looks for what is given, exactly, case sensitive. The search key is made more general or more specific based on what is specified. One mod might search for one where the other mod searchs for the other. The more specific the search the more likelyhood of not over writing potentially another mods changes. If you looking to write a mod, be sure to search for in the code as specific of a search key you can. I hope this helps.
SMF 2.0.4
SimplePortal 2.3.5

LOGIC is a FOUR letter word! :)


kat

Thanks, guys.

Answers to both parts!


Advertisement: