A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: The most bizarre php/outlook express bug you will ever see! >>

  1. #1
    Running Plodding & Limping SpockBert's Avatar
    Join Date
    Jun 2002
    Location
    London
    Posts
    593

    The most bizarre php/outlook express bug you will ever see! >>

    Can anyone make sense of this:

    I'm trying to make a formatted email which sends to outlook express details of a customers wishlist.

    I won't post all the code but basically after much much much trial and error it all comes down to one "FOR" loop in php and within that the length of one hardcoded string!

    For example:
    //big for loop for entire array
    for ($i = 0; $i < $num_rows; $i++){

    $wishlist_ref = $wishlist_array[$i];

    //works!
    $image_link = "http://www.burlingtonjewellers.com/abcdefghijkl/$wishlist_ref.jpg";


    $list_gen = $list_gen."<tr><td>$image_link</td></tr>";

    }


    This generates a nice list of image links:

    http://www.burlingtonjewellers.com/a...kl/79298_B.jpg
    http://www.burlingtonjewellers.com/a...kl/79298_F.jpg
    http://www.burlingtonjewellers.com/a...kl/79298_G.jpg
    http://www.burlingtonjewellers.com/a...ijkl/75299.jpg
    http://www.burlingtonjewellers.com/a...hijkl/79120_CZ. jpg
    http://www.burlingtonjewellers.com/a...ijkl/79128.jpg

    But if I make that hardcoded string in that loop just one character longer, i.e this:
    //big for loop for entire array
    for ($i = 0; $i < $num_rows; $i++){

    $wishlist_ref = $wishlist_array[$i];

    //doesn't work!
    $image_link = "http://www.burlingtonjewellers.com/abcdefghijklm/$wishlist_ref.jpg";


    $list_gen = $list_gen."<tr><td>$image_link</td></tr>";

    }


    Note, everything is the same but now the results have an unwarranted white space which breaks the image link:

    http://www.burlingtonjewellers.com/a...lm/79298_B.jpg
    http://www.burlingtonjewellers.com/a...lm/79298_F.jpg
    http://www.burlingtonjewellers.com/a...lm/79298_G.jpg
    http://www.burlingtonjewellers.com/a...jklm/75299.jpg
    http://www.burlingtonjewellers.com/abcdefghij klm/79120_CZ.jpg
    http://www.burlingtonjewellers.com/a...jklm/79128.jpg

    sometimes the gap appears here like http://ww w.burling.... or other places and it normally happens in the 11th item, if the customers wish list only contains say 10 items it works fine.

    I've tested the generated html many times in both firefox and IE, its only mail programs like outlook express and yahoo mail where this extra white space appears.

    I've tried doing a string replace for white space but it still doesn;t work.

    Can anyone help, I've spent 2 days on this, it really is bizarre, I cannot understand why a 48 char hardcoded value works and a 49 char length one fails!

    Makes no sense....arrrrhhhhhh can anyone help!!

  2. #2
    Bearded (M|G)od MyFriendIsATaco's Avatar
    Join Date
    Dec 2002
    Location
    Awesomeville.
    Posts
    3,045
    Lots of those crappy email clients can't render long links properly. That's why most people put the actual clickable link, and the plain text with instructions to copy and paste into the browser if the link is broken.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center