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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.