PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old October 12th, 2003, 11:45 AM
kode_monkey kode_monkey is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 367 kode_monkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 21 sec
Reputation Power: 5
PHP String Tutorial

Lots of the questions in this forum are related to string manipulation in some form or another. This is largely due to the large number of string functions available that not everyone knows about or how to use.

To counter this problem I was giving some thought to writing a string tutorial but before I even started I came across this -

http://codewalkers.com/tutorials/45/1.html

Its a fantastic tutorial with loads of details about string functionality in php. Whether you're a complete novice who needs a good starter or an experienced coder who wants to brush up on the topic I'd highly recommend reading it.

Hope this is of use to someone,

-KM-

Reply With Quote
  #2  
Old October 12th, 2003, 02:13 PM
manoloweb manoloweb is offline
Moderated
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Monterrey MX
Posts: 49 manoloweb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
It is a very good string tutorial!!

The only thing I have not seen documented is the way I manage sql strings when constructing queries...

PHP Code:
 $name "me";
$pass "secure";
mysql_query("select * from users where name='$name' and pwd='$pass'"); 


How can PHP parse the $name and $pass variables when they're between single quotes??

I don't know, but it works as expected... maybe i missed some note or remark in the documentation...

;-)
__________________
The deal is not to know everything, but to know the email of the one who does.

Reply With Quote
  #3  
Old October 12th, 2003, 02:47 PM
kode_monkey kode_monkey is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 367 kode_monkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 21 sec
Reputation Power: 5
PHP parses $name and $pass because the string itself is enclosed in double quotes. The single quotes are there for mysql's benefit and are output as is by php.

Hope this helps,

-KM-

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > PHP String Tutorial


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway