MarcellaE Posted April 17, 2007 Posted April 17, 2007 I want to create a link elsewhere in my store that carries over the session ID and %s seems to do that but I can't use that anywhere else in the store. Creating such a link elsewhere only displays: http://www.mydomain.com/store/catalog/%s?o...96292dfbd03cddc Any thoughts how to do this?
Guest Posted April 17, 2007 Posted April 17, 2007 The only time I've seen the "%s" used is when using sprintf: eg <?php $url = 'www.google.com'; $name = 'Google'; $desc = 'Google Search Engine'; define('TEXT_INFORMATION', 'For more information, please visit <a href="http://%s">%s</a> ("%s").'); echo sprintf(TEXT_INFORMATION, $url, $name, $desc); ?> Will output: For more information, please visit Google ("Google Search Engine"). Breakdown: sprintf('the line containing the %s', 'the first %s value', 'the second %s value', 'the third %s value');
Recommended Posts
Archived
This topic is now archived and is closed to further replies.