Hello all! I somewhat new to PHP, and was wondering if anyone could give some suggestions on a switch function to reduce redundancies, and to efficaciously implement the script on to other sites.
Code:
<?php
$choice=$_GET['act'];
switch($choice)
{
case 'about':
if(file_exists("includes/about.php"))
include("includes/about.php");
break;
case 'contact':
if(file_exists("includes/contact.php"))
include("includes/contact.php");
break;
default;
include("includes/about.php"); }
?>
Converting from one format to another
"I have got a date in DD/MM/YYYY but I need it in MM-DD-YYYY. Help!"
Displaying a clickable playername
I am going wrong somewhere with the mysql_query, can someone please put me straight?$playername = mysql_query("SELECT * FROM `players` WHERE `playername` LIMIT 1");while($f =
get font info from a font file
hello,Does anyone know how to get font info from a font file ... using php of course ! The stuff I need to extract is Font Family, Author, Copyright etc which is contained as attributes in the font
the problem with str_replace
$str="hahahahahahahahahahahahahaha";$nn=1;$str=str_replace('ha','MyGod',$str,$nn);echo $str;the result is MyGodMyGodMyGodMyGodMyGodMyGodMyGodMyGodMyGodMyGodMyGodMyGodMyGodMyGodWhy $nn has no
PHP5/Zend 2.0 - Resources
PHP5 Snapshots
please hep to get values from a table row
can anyone tel me how I can select and get data from one row by pressing an Edit button in that row?<?phpif (!empty($avil_holidays)){ foreach ($avil_holidays as $val) { switch
timed header image rotation
I have a joomla site and I was trying to setup a rotating image based on timing NOT just refreshing the page.I found this code (i didn't write it) which works to load images but does not switch them
PHP Game
hy i was wondering what's the best method in order to make some automatic updates in a php gamelet's say that the user should gain 1gold each minute but the user is not logged in and the process is
! = ''
In the following 'IF' statement if v_ompcat = PU for example then Oracle equates that 'IF' statement to NOT TRUE and skips onto the next 'IF' satement whereas I would have thought that it would have
Having Problem with Date
l have a submit buttom where user have the possibility to add a date to specify when his message should be made reachable online.I have seen a bug which l am not having a clue to solve and l need