Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

126
Views
Can i set a php variable value to a html element that is being manipulated by javascript

Im sorry I didnt know how to phrase my question well, but i have my php code:

<div class="header">
        <h1>Space Invaders</h1>
        <p style="color: yellow;">.</p>
    </div>
    <h1 class="results">SCORE: 0</h1>
    <?php
    $results = "results";
    if ($results == 'YOU WIN') {
        echo("OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO");
    }
    ?> 

and i have my script that will change the text at class results when the game finishes it will say "YOU WIN" Okay so now i want to make a if statment in php when the results transforms into "YOU WIN". I just cant figure a way out, sorry about my english too.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!