# Quik PHP question

**URL:** <https://forum.kirupa.com/t/quik-php-question/111192>\
**Category:** Uncategorized\
**Created:** [May 24, 2004, 5:29pm UTC](https://forum.kirupa.com/t/quik-php-question/111192 "2004-05-24T17:29:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![iloveitaly](https://avatars.discourse-cdn.com/v4/letter/i/7ea924/32.png) [@iloveitaly](https://forum.kirupa.com/u/iloveitaly)\
**Post date:** [May 24, 2004, 5:29pm UTC](https://forum.kirupa.com/t/quik-php-question/111192/1 "2004-05-24T17:29:49Z")

</div>

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:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 26, 2004, 4:19pm UTC](https://forum.kirupa.com/t/quik-php-question/111192/2 "2004-05-26T16:19:41Z")

</div>

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:

```php
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…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 26, 2004, 4:23pm UTC](https://forum.kirupa.com/t/quik-php-question/111192/3 "2004-05-26T16:23:22Z")

</div>

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

```php
array(5 => 'Jan', 'Feb', 'Mar');

```

then it will start at 5 (index), then Fed will be at 6 and Mar at 7…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 26, 2004, 7:36pm UTC](https://forum.kirupa.com/t/quik-php-question/111192/4 "2004-05-26T19:36:28Z")

</div>

> [@sinus\_](#):
>
> 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
> 
> ```php
> 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\_

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 27, 2004, 7:13am UTC](https://forum.kirupa.com/t/quik-php-question/111192/5 "2004-05-27T07:13:51Z")

</div>

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 🙂
