Results 1 to 4 of 4

Thread: [RESOLVED] Add " quote mark

  1. #1

    Thread Starter
    Frenzied Member I_Love_My_Vans's Avatar
    Join Date
    Jan 2005
    Location
    In the PHP compiler
    Posts
    1,275

    Resolved [RESOLVED] Add " quote mark

    PHP Code:

    <?php

    $db 
    mysql_connect("""""");

    mysql_select_db("MeltdownMySql",$db);

    $result mysql_query("SELECT * FROM meltdown_links ORDER BY priority",$db);

    echo(
    "<ul>");

    while (
    $myrow mysql_fetch_row($result)) {

    printf("<li><a href=%s>%s</a></li>"$myrow[1], $myrow[0]); [B]<----[/B]


    }

    echo(
    "</ul>");
    ?>
    Right then the line indicated works great, but how do i add a quote mark like this " ?

    As obviously adding one simply stops the string.

  2. #2

    Thread Starter
    Frenzied Member I_Love_My_Vans's Avatar
    Join Date
    Jan 2005
    Location
    In the PHP compiler
    Posts
    1,275

    Re: [RESOLVED] Add " quote mark

    Problem solved

    ILMV

  3. #3
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099

    Re: [RESOLVED] Add " quote mark

    For further reference you use escape characters, so " would be \". For more info about escape characters check out

    http://uk.php.net/manual/en/language.types.string.php

  4. #4
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: [RESOLVED] Add " quote mark

    You should use single quotes for normal strings and double quotes around escape sequences.

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