Results 1 to 8 of 8

Thread: [RESOLVED] -> = and some other questions

  1. #1

    Thread Starter
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Resolved [RESOLVED] -> = and some other questions

    What does => do, and whats the difference from that an =?

    Also, how come i cant just do:
    $response-> getit();

    but i have to do
    $stuff = $response-> getit();

    or else it $stuff will just return 'object'?

    Thanks

    edit*

    How do i find the ascii of a string char?
    Last edited by |2eM!x; Nov 16th, 2005 at 07:15 PM.

  2. #2
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: -> = and some other questions

    I have no idea what you are talking about

    -> is the object access operator and
    => is used to assign key names to arrays
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  3. #3

    Thread Starter
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: -> = and some other questions

    Okay, I have some source and it uses an include file where there are functions..i cant just use the functions like normal, i have to use => and i dont know why..

    Also how do i find the ascii of a letter?

  4. #4
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: -> = and some other questions

    Do you mean -> ?? You never access functions using =>

    Like I said in my previous post, -> is the object access operator. Its the equivilent of a . in VB and is used to access object members.
    VB Code:
    1. Dim myObj As new MyObject
    2.  
    3. Print myObject.property;
    4. Print myObject.memberFunction;

    The same in PHP would be:
    PHP Code:
    $myObj = new MyObj;

    echo(
    $myObj->property);
    echo(
    $myObj->memberFunction()); 
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  5. #5
    Lively Member {yak}'s Avatar
    Join Date
    Aug 2005
    Posts
    119

    Re: -> = and some other questions

    Quote Originally Posted by |2eM!x
    Also how do i find the ascii of a letter?
    ord() should be what you're looking for.
    {yak}

  6. #6

    Thread Starter
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: -> = and some other questions

    visual yeah your right, -> is what im using. I now understand what the thing does, and thanks yak for the ord thing.

    Also one more question:
    Is there a mod operator? Something that will tell me if one number is divisible by another?

  7. #7

    Thread Starter
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: -> = and some other questions

    found it bcmod

    okay, lemme see if i got this right, to see if a number is divisble by like 4 you do

    PHP Code:
    if (bcmod('8','4') == '0'){ 
    am i right?

  8. #8
    Lively Member {yak}'s Avatar
    Join Date
    Aug 2005
    Posts
    119

    Re: -> = and some other questions

    The modulus operator is the percent sign:
    '%'

    Good luck;
    {yak}

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width