Wrox Programmer Forums
|
BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1
This is the forum to discuss the Wrox book Professional PHP5 by Ed Lecky-Thompson, Heow Eide-Goodman, Steven D. Nowicki, Alec Cove; ISBN: 9780764572821
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 6th, 2009, 01:39 AM
Authorized User
 
Join Date: Dec 2007
Posts: 65
Thanks: 9
Thanked 2 Times in 2 Posts
Send a message via AIM to sandeepgreaternoida Send a message via MSN to sandeepgreaternoida Send a message via Yahoo to sandeepgreaternoida
Arrow ereg()

Code:
<?php
$words="you, should,i love you";

ereg("i love you",$words,$reg);
echo " Found string '$reg[0]'";
?>

why we use '0' in $reg[0]...while echo out the function.

thanx !
__________________
sandeep gupta
 
Old May 8th, 2009, 03:21 PM
Authorized User
 
Join Date: Nov 2008
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Cool hmmm...

Its to specify the array index of $reg.





Similar Threads
Thread Thread Starter Forum Replies Last Post
ereg and eregi Hell! TreeWalker BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 June 21st, 2003 11:19 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.