Jump to content


$this


  • Please log in to reply
6 replies to this topic

#1 Guest_askjames01_*

Guest_askjames01_*
  • Guests

Posted 04 May 2006 - 03:51 AM

as part of my review just like i said before i want to make my understanding solid...

here it goes again...

$this

is this code built in with php? i mean is this reserved with php?
the answer must be Yes or No?

if yes then it means i can't use them as user define variable, because they are reserved. right?


#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 04 May 2006 - 01:07 PM

Yes the variable $this is predifined variable within PHP. It is used in conjuction with classes to set/call a variable/function when in side class.

You cannot use the variable $this in your scripts no.

However, you can use either of the following $This, $ThIs, $THIS etc. As PHP is case sensitive with variables. And so php doesn't see $This as $this.

#3 Guest_askjames01_*

Guest_askjames01_*
  • Guests

Posted 04 May 2006 - 01:11 PM

[!--sizeo:4--][span style=\"font-size:14pt;line-height:100%\"][!--/sizeo--]Excellent![!--sizec--][/span][!--/sizec--] love ya!

#4 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 04 May 2006 - 02:16 PM

No problem!

off topic: Umm, I have gone over 2000 posts! God I need to get out more

#5 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 04 May 2006 - 02:52 PM

:( What does that say for me???

Info: PHP Manual


#6 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 04 May 2006 - 03:41 PM

I guess we both do lol! WOW! Barand is king of all post with 6700+ posts! Howwver hes been here far longer.

#7 Guest_askjames01_*

Guest_askjames01_*
  • Guests

Posted 04 May 2006 - 06:36 PM

excuse me brothers.
but i'm not in a hurry.

what i need here is to master PHP.
so my coding will be solid.

anyways you are the mods you need that i think.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users