SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: Error message ?

Hybrid View

  1. #1
    SitePoint Wizard co.ador's Avatar
    Join Date
    Apr 2009
    Posts
    1,054
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Error message ?

    Notice: Uninitialized string offset: 0 in C:\wamp\www\drstore\shoes\ on line 79

    What could this error could be coming from? How can I go about fixing it?

    Help please.

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    It comes from the code on line 79

  3. #3
    SitePoint Wizard co.ador's Avatar
    Join Date
    Apr 2009
    Posts
    1,054
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you know what "Notice: Uninitialized string offset: 0" means?

    Thank you Dan

  4. #4
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You tried to access element 0 of a variable which was not an array. This code would generate that notice:

    PHP Code:
    $var "";
    echo 
    $var[0]; 

  5. #5
    SitePoint Wizard co.ador's Avatar
    Join Date
    Apr 2009
    Posts
    1,054
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Exactly that what was happening I had

    PHP Code:
    sel_shoe=""
    Now I assigned a $_GET ['id']; value and it now works

    Now I am facing another issue.

    The code below shows the shoe kind and below it the shoes of that kind appear padding-left:20px ten pixels more to the right than shoekind table so the users can see and identify the shoes by its kind.
    the code below, hide the shoes inside the shoekind field and the shoes will only be visible if users click on the shoekind field. Once they click all the shoes comes to visibility and users will be able to choose what shoes they want. onto that point everything works good. But when I click in the shoe then it shows the shoes but the shoekind field hides all the shoes again instead of staying displaying the shoes under the shoekind field regardless the users clicked on one shoes under it. I want it to still displaying the shoes even though I click in one of the shoes, The code below hides shoekind display and just leave the shoes I picked from the shoekind field, hides the display menu and leave the users with content of the shoes available at the right side of t he windows where I set up the items or shoes to appear.

    How can I arrange the coding so it display the shoes below the shoekind field and leave whether a users click on an item or not.

    PHP Code:
    echo "<ul class=\"shoecategories\">";
      if (
    $shoekind["id"] == $sel_shoe['id']) {
      while(
    $rshoe mysql_fetch_array($regularshoe_set)){
      echo 
    "<li"
      if (
    $rshoe["id"] == $sel_shoe) {
      echo 
    " class=\"selected\"";
      } 
      echo 
    "><a href=\"shoe1.php?menu=" urlencode($rshoe["id"]) ."\";>{$rshoe["shoename"]}</a></li>";  }
      }
      

       echo 
    "</ul>"


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
  •