SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: PHP question

  1. #1
    SitePoint Member
    Join Date
    May 2001
    Location
    NJ
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey y'all. does anyone know how to convert a string to int in PHP? i searched php.net and didn't find anything.

    thanks
    -craig

  2. #2
    SitePoint Zealot cokeman's Avatar
    Join Date
    Dec 2000
    Location
    So. California
    Posts
    173
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://php.net/manual/en/language.ty...e-juggling.php

    You can cast it as in C

    $int_var = (int) $str_var;


Bookmarks

Posting Permissions

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