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

288
Views
PHP: 'StringLiteral' inesperado. Esperado ','

Recibo este aviso de error en el código VS Unexpected 'StringLiteral'. Expected ',' con el código PHP a continuación. Por favor, ayúdame a entender lo que está mal en él. Veo este error con la línea que comienza con Click to...

 while ($dbh->next_record()) { $tracker_info = json_decode($dbh->Record['tracker_info'], TRUE); inform_sl_operations("PO$dbh->Record['po_number'] needs Follow Up. Due: $dbh->Record['alert'] \n" . " Click to <a href="'search_results.php?po_number=$dbh->Record['po_number']'">view order</a>," . " service@pmm.com", "PO $dbh->Record['po_number'] needs Follow Up"); }
over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Usando " comillas internas, como:

 $string = "href="example.com"";

Está mal y necesita ser escapado, como:

 $string = "href=\"example.com\"";

Otro posible error, no lo hagas:

 $string = "$dbh->Record['po_number']";

Almacene en variable y luego use, como:

 $po_number = $dbh->Record['po_number']; $string = " ... $po_number ... ";

Prueba algo como:

 while ($dbh->next_record()) { $tracker_info = json_decode($dbh->Record['tracker_info'], TRUE); $num = $dbh->Record['po_number']; $alert = $dbh->Record['alert']; inform_sl_operations("PO $num needs Follow Up. Due: $alert \n" . " Click to <a href=\"search_results.php?po_number=$num\">view order</a>," . " service@pmm.com", "PO $num needs Follow Up"); }
over 4 years ago · Santiago Trujillo Report

0

Debe evitar las comillas dobles en el atributo href de <a>

 "<a href=\".......\">"
over 4 years ago · Santiago Trujillo Report
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!