Jump to content

[SOLVED] Flaw with .printf


director87

Recommended Posts

Hi all.

 

I'm coding a simple commentary page which calls to an AJAX function I've created. The code below prints the path of the link outside as text, when I want the path as the URL for the link!

 

echo "<a href=\"javascript:llamarasincrono('".printf('%s?pageNum_Recordset1=%d%s', $currentPage, min($totalPages_Recordset1, $pageNum_Recordset1 + 1), $queryString_Recordset1)."', 'commentarios');\">Next</a>";

 

an example of the output would be:

 

 

/jose/commentarios.php?pageNum_Recordset1=1&totalRows_Recordset1=9&user_fk=31 Next

 

 

When it should just print the link:

 

Next 

 

I'm absolutely stuck. I hope I explained this somewhat efficiently... I'm sure it has to do with the etiquette of my quotations. Please let me know if my explanation is clear enough. All help is appreciated!!!  8)

 

Saludos,

Mark

Link to comment
https://forums.phpfreaks.com/topic/65950-solved-flaw-with-printf/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.