\n";
echo "" . $title . "
\n";
if ($author || $date) {
echo "\n";
if ($author) {
echo "Submitted by " . $author . "
\n";
}
if ($date) {
echo $date . "
\n";
}
echo "\n";
}
echo "
\n";
}
?>
Cool PHP Tips and Tricks
This page is going to contain a collection of "neat" tips and tricks
related to PHP. They aren't necessarily be related to actually coding in PHP
(as our first example shows), but they are, in our opinion, pretty cool.
Send your suggestions for tips to webmaster@php.net.
Quick access to PHP documentation and site search for all Mozilla and Netscape 6 users:
- Click "Bookmarks -> Manage Bookmarks"
- Create a bookmark in a folder of your choice on the following URL: http://www.php.net/manual-lookup.php?function=%s (or mirror site of your choice)
- Choose a name for your bookmark.
- Right click the bookmark you´ve created and select "Properties..."
- Choose a "custom keyword" you want to enter in the URL bar, eg. "phpman" and fill it in.
- Click "ok" and open a new browser window.
- Finished. Now you´re able to enter eg. "phpman fgets" to look up the manual entry on the function fgets() or
eg. "phpman building php4" to search all available information how to build php4.
- If you don't already have the IE5 Tools package, download and install it from
www.microsoft.com/Windows/IE/WebAccess/ie5tools.asp
- Launch the QuickSearch utility (you'll find it on your Links bar)
- Add a new search shortcut by clicking on "New" and use the following settings:
- Shortcut: php
- Search: Custom URL
- URL: http://www.php.net/manual-lookup.php?function=%s
... or substitute your favorite mirror site instead of www.php.net

- Click "Ok", then click "Save" to keep your new settings
- That's it! Try it by typing "php strlen" in the IE Address bar. You should
jump right to the manual entry for strlen. And because the QuickRef code on the
PHP site is smart, you can use it to do general searches of the PHP site. For
example, try typing "php file upload" in your browser.
tipTitle('Adding the Quick Reference to Netscape on Linux', 'David Rose', '28-Jul-2000'); ?>
Further to the example above for Windows/IE users, here's something Linux folk can do:
- Create a file called phpfind somewhere on an executable path
- In that file, write the following code (substituting the path to Netscape,
if necessary):
#!/bin/sh
/usr/bin/netscape http://www.php.net/manual-lookup.php?function=$1
- Save it and type chmod +x phpfind to make it executable
- That's it. When you type "phpfind funcionname" on your command line,
Netscape will open the proper URL for you.
tipTitle('Quick Reference for Gnome Users', 'Benjamin Curtis', '29-Jul-2000'); ?>
Here's another search option for Linux users who use Gnome. This is a macro
for gnome's mini-commander panel applet (modified from the Yahoo search that
comes with the applet):
Regex:
^php: *(.*)$
Macro:
gnome-moz-remote --newwin http://www.php.net/manual-lookup.php?function=$(echo
'\1'|sed -e ': p;s/+/%2B/;t p;: s;s/\ /+/;t s;: q;s/\"/%22/;t q')
commonFooter();
?>