I am editing a free script right now, but I have problem with calling for a variable... The code look like this <title>{TITLE}</title> Code (markup): the variable title is working perfectly when embeded in html... but my problem is that I want to assign the value TITLE variable to another variable in php code... I tried the following $newvar = TITLE; , also $newvar=$TITLE But both approch not working.... Thank you in advance
Seems like you're using some kind of template system. Are you trying to assign the variable in the template file or in the actual PHP file? There's probably some part in the PHP file where the template variables are assigned. Search for this part and look at the variable which is used there.
Yah, actually it coppermine photo gallery script... and I am trying to locate how to get the value of TITLE variable in actual php file but no success
I downloaded it quick and had a look. The title is defined like this in some files. '{TITLE}' => sprintf($lang_ecard_php['ecard_title'], $data['sn']), PHP: Seems like the language variables should be accessible everywhere. So try using this: (Taken and modified from displayecard.php) $data = array(); $data = @unserialize(@base64_decode($_GET['data'])); // attempt to obtain full link from db if ecard logging enabled and min 12 chars of data is provided and only 1 match if ((!is_array($data)) && $CONFIG['log_ecards'] && (strlen($_GET['data']) > 12)) { $result = cpg_db_query("SELECT link FROM {$CONFIG['TABLE_ECARDS']} WHERE link LIKE '{$_GET['data']}%'"); if (mysql_num_rows($result) === 1) { $row = mysql_fetch_assoc($result); $data = @unserialize(@base64_decode($row['link'])); } } $newvar = sprintf($lang_ecard_php['ecard_title'], $data['sn']); PHP: