knox203 Posted May 7, 2008 Share Posted May 7, 2008 Hello everyone, I'm using a DHTML calendar I found on the net, and have it set up so users can select multiple dates. As soon as they select a day, the value goes to a <div id="calendar-output">. I want to display this area on two different parts of the webpage but am realizing I can't have two <div> sections with the same id. Is there any way using PHP that I can store the data that goes to a <div> so I can then use the PHP function to replicate the values elsewhere on the page? I suppose I could spend time trying to modify the actual Java code to make it support multiple outputs, but would be preferred if I could just accomplish this with PHP. Thanks! - Adam Quote Link to comment https://forums.phpfreaks.com/topic/104597-storing-data-to-replicate-elsewhere-on-page/ Share on other sites More sharing options...
ucffool Posted May 14, 2008 Share Posted May 14, 2008 Use output buffering. ob_start(); // generate the data $output = ob_get_contents(); ob_end_flush(); // Send the output to the page // later in the page, just echo $output. Quote Link to comment https://forums.phpfreaks.com/topic/104597-storing-data-to-replicate-elsewhere-on-page/#findComment-540928 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.