Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 02-19-2007, 01:18 PM eregi
afridy's Avatar
Extreme Talker

Posts: 196
Trades: 0
PHP Code:
$name="Jungle Book";
$rslt=eregi ("g"$name);
print 
$rslt
Output: 1

PHP Code:
$name="Jungle Book";
$rslt=eregi ("z"$name);
print 
$rslt
Does not print anything. Friends, Y php does not print a 0 ?
afridy is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-19-2007, 01:47 PM Re: eregi
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,898
Name: Keith Marshall
Location: Connecticut
Trades: 0
I think it outputs 'false' if there is no match. You can force it as an integer using the int cast:

print (int)$rslt;
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 02-19-2007, 02:03 PM Re: eregi
afridy's Avatar
Extreme Talker

Posts: 196
Trades: 0
Thanks mgraphic

ill check it...
afridy is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to eregi
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13039 seconds with 12 queries