Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5
This is the forum to discuss the Wrox book Beginning PHP4 by Wankyu Choi, Allan Kent, Chris Lea, Ganesh Prasad, Chris Ullman; ISBN: 9780764543647
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 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
  #1 (permalink)  
Old March 8th, 2005, 06:52 AM
Registered User
 
Join Date: Mar 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Undefined Offset

Hi, i was wondering if someone could help me understand this error and why it is happening....

The error is "Notice: Undefined offset: 2 in c:\inetpub\wwwroot\php\listbox.php on line 10".

i am currently going through "Beginning PHP4". i have become aware of some issues due to it being out dated but can't seem to figure this one out.

The code below is exactly how it should be (so i thought anyway). The code itself works perfectly fine other than the error message that appears.

any help is much appreciated.

<html>
<head></head>
<body>
<?php
$EngineSize = $_GET['EngineSize'];
$Price = $_GET['Price'];
echo "Price Range: $Price";
echo "<br>Engine Size(s): $EngineSize[0]";
echo $EngineSize[1];
echo $EngineSize[2];
echo $EngineSize[3];
?>
</body>
</html>

  #2 (permalink)  
Old December 9th, 2009, 06:49 AM
Registered User
 
Join Date: Dec 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yup Buddy..facing the same issue...i think it has to do with using keys in an array


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Undefined offset: 1 chapter 5 form.php sreenivasharish BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 November 9th, 2008 06:08 PM
undefined offset error trev Beginning PHP 9 January 24th, 2007 04:41 AM
Notice: Undefined offset: ## Herjan BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 0 November 27th, 2005 12:29 PM
Loops and Arrays - Undefined offset notice dkintheuk Beginning PHP 6 September 12th, 2005 11:38 PM
ImageLine Undefined offset error ss2003 Beginning PHP 3 January 13th, 2004 04:37 PM





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