Hey guys,
while trying to learn PHP i’ve come across “->”
its used like this
$varibal->something()
I have never seen that used in javascript, or actionscript. so naturally i have no idea what it does. I think it might mean “use something() on the designated varibal”.
2nd thing is, in a array i have seen scripts that do something like this:
array(1 => ‘January’, ‘February’, ‘March’);
I was like, huh? there using the => to make an array? What is that doing in the array? if you could clear this up for me that would be great! :be:
i havent read all the posts in this thread but the $Something->something() has something do with classes and objects… it is easier to understand if it was something like this:
echo $object->getvalue();
im trying to learn classes myself… i found out that on big project, its a lot harder to “design” the classes rather than making them…
array(1 => ‘January’, ‘February’, ‘March’);
i think that is an indexed array…
so instead of starting from 0, the array would start at 1…
then the following values would be 2,3,4,5,6… etc…
if it was
array(5 => 'Jan', 'Feb', 'Mar');
then it will start at 5 (index), then Fed will be at 6 and Mar at 7…
I don’t think you can do that sinus_
ohhhs… yeah… sorry bout that…
i was trying to imply how to make an array and specify the indexes… forgot how… please post here how Hamza84… would appreciate