wdvltalk Roundup May 2002 - Page 21
June 4, 2002
A load of sites now supply a custom icon which is displayed in the IE
favourites menu. Any ideas on how to do it?
Suppose I have a variable $sv_date that contains "3/6/2002".
Using <?php echo ?>, how can I display this date as
June, 03, 2002?
-
With European-style dates, you can't use strtotime() but you can make
your own function to parse your dates and use the date() function to
reformat.
function datetotime($mydate)
{
$tmp = split("/",$mydate);
$day = $tmp[0];
$mo = $tmp[1];
$yr = $tmp[2];
return mktime(0,0,0,$mo,$day,$yr);
}
function convertDate($mydate)
{
$mytime = datetotime($mydate);
return date("F d, Y",$mytime);
}
-
See:
http://www.php.net/manual/en/ref.datetime.php
-
Grab your favourite irc client and
hop on to irc.openprojects.net on port 6667. Then join #vanpug. Also they
have a forum for the chat challenged at:
http://vancouver.php.net/forum that is starting to pick up speed too.
Does anyone know where I could find a script which will place a div at the
bottom of the browser window, even when scrolled or re-sized?
How do I upload the database that I created with MySQL
using the CREATE DATABASE command at the MySQL prompt?
Does anyone have a CMYK to RGB conversion chart, etc.?
I have done a search, but haven't come up with any type of
Conversion Chart.
What's the PHP equivalent of <% response.redirect "URL" %> in
ASP?
echo" <script> window.location=\"http://sitename/test.php\"
</script>";
I use this:
$strRedirectURL = "http://www.site.com/page.html
header("Location: $strRedirectURL");
One more method is
header("Location: url"). But make sure you didn't use any echo() statement
or print statement(). If so u will be getting error say header already sent.
header ("Location: http://mysite.com/test.php");
wdvltalk Roundup May 2002 - Page 20
wdvltalk Roundup
wdvltalk Roundup May 2002 - Page 22
|