SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast geeOff's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta, GA 30328
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    convert VB Mid$ to PHP $something ?

    hey all --

    i am having a tough time converting a VB function to it's equivalent in PHP. it's the VB Mid$ function, close to Left$ or Right$ (left or right sides of strings), for extracting chunks of strings...but you pass in the text you want to pull from...then tell Mid$ which character to start at and how many characters you want to pull starting from there. like so: Mid$ ($thetext_toparse, $character_tostartat, $how_many_characters)...sorry for the VB/PHP combination, i am used to PHP variables now.

    does anyone know what PHP function i would want to use to emulate this ? thx, Geoff

  2. #2
    SitePoint Enthusiast geeOff's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta, GA 30328
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    sorry for the firedrill...

    i figured it out: substr ($thetext_toparse, $character_tostartat, $how_many_characters); did it perfect. i guess it pays to crack a book once ina while...page 183 of the wrox book slapped me in the face - doH !!


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
  •