Skip to content

Tag: php

Jquery removing commas

I’m using the following and it works, but the alerted value opt3 contains commas. How do I remove them? If I select a c & d the alert shows a,c,d but I want it to show acd. Answer What about this? Update: Ok. Like @jreziga mentioned. The return value of .val() will be an array. If you have a string

PHP: file_get_contents a PHP file with include();

I have a PHP Script that calls a master PHP template (acts as HTML template) with file_get_contents, replaces a few words from it and then saves the final file as another PHP in a directory. But the master PHP template itself has include(); and require_once(); in it and the saved file after replacing the word…

Warning: session_destroy(): Trying to destroy uninitialized session

my class.inc file: used code for my logout: When the logout function is called, it destroys the session, but shows the warning: I am unable to troubleshoot, as the session is not being destroyed by any other means before the session_destroy() of class.inc. Answer You have to call the function mentioned below …