CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2005
    Posts
    73

    Problem with embedding JS code in PHP

    Hi all,

    I have the following string as part of my PHP code (before you ask, it HAS to be in PHP, can't write PHP and HTML separately):

    Code:
         $submission_form ="
            <p style=\"font-size:20px; padding: 15px;\">
                <u>Please select the type of analysis you wish to perform</u>
            </p>
            <form name=\"analysis_form\" method=\"post\">  
            <div>
                <a id=\"myHeader1-2\" href=\"javascript:showonlyonev2(\"newboxes1-2\");\" >
                    <input type=radio name=\"criterion\" value=\"single_genotype\">
                    Single-study analysis using genotypes
                </a>
            </div>
    Everything works fine, except the JS part...Because it should have single quotes, but this I can't do it inside the PHP string...
    Any ideas?

  2. #2
    Join Date
    May 2002
    Posts
    10,943

    Re: Problem with embedding JS code in PHP

    Why do you say you can't do single quotes inside a PHP string?
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

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

Featured