Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-25-2007, 04:14 PM   PM User | #1
srule_
Regular Coder

 
Join Date: Jul 2007
Posts: 571
Thanks: 25
Thanked 28 Times in 28 Posts
srule_ is an unknown quantity at this point
Functions help

hey, I am a newbie to PHP and a have a simple question about using functions.

It seems for more tasks there is no need to make your own function as one of php's built in functions can do the job. However since I am new to PHP i do not know when php already has a function that will suit my needs.

Since there are thousands of built in functions i wanted to know how do you know if there is already a php funtion u can use or if u must make your own.
srule_ is offline   Reply With Quote
Old 07-25-2007, 04:24 PM   PM User | #2
daemonkin
Regular Coder

 
Join Date: Jun 2007
Location: N. Ireland
Posts: 351
Thanks: 16
Thanked 4 Times in 4 Posts
daemonkin is on a distinguished road
You need to look at the PHP Manual and just search in the area you are using - MYSQL, Int, Array etc

Or do a google for php and a description of what you are after and that should give you some function names that you can then search on PHP Manual

D.
__________________
Daemonkin.
If this was helpful, please add to my reputation
Thousand Sons - Freelance Web Developer - ninetyonedegrees.com
daemonkin is offline   Reply With Quote
Old 07-25-2007, 04:51 PM   PM User | #3
timgolding
Senior Coder

 
timgolding's Avatar
 
Join Date: Aug 2006
Location: Southampton
Posts: 1,466
Thanks: 90
Thanked 110 Times in 109 Posts
timgolding is on a distinguished road
I'm constantly making functions to do something that i could of done in one line of code. Usually a good search will return something on the subject. But i quite often ask in here and get a response from a codingforum guru
__________________
You can not say you know how to do something, until you can teach it to someone else.
timgolding is offline   Reply With Quote
Old 07-25-2007, 06:17 PM   PM User | #4
whizard
Senior Coder

 
whizard's Avatar
 
Join Date: Jan 2005
Location: Philadelphia, PA, USA
Posts: 1,457
Thanks: 10
Thanked 37 Times in 37 Posts
whizard will become famous soon enoughwhizard will become famous soon enough
Specifically, here is the list of functions

HTH
Dan
__________________
If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.
Step 1: Learn. Step 2: Search. Step 3: Post here.
whizard is offline   Reply With Quote
Old 07-25-2007, 11:00 PM   PM User | #5
GJay
Senior Coder

 
Join Date: Sep 2005
Posts: 1,791
Thanks: 5
Thanked 36 Times in 35 Posts
GJay is on a distinguished road
the php.net website is quite clever, in that trying to load http://php.net/<function_name> will make a guess if the name you try doesn't exist. I often find myself forgetting the exact name of a function and find that really useful.
__________________
My thoughts on some things: http://codemeetsmusic.com
And my scrapbook of cool things: http://gjones.tumblr.com
GJay is offline   Reply With Quote
Old 07-25-2007, 11:03 PM   PM User | #6
zro@rtv
Regular Coder

 
zro@rtv's Avatar
 
Join Date: Feb 2005
Location: on the network
Posts: 433
Thanks: 0
Thanked 1 Time in 1 Post
zro@rtv is an unknown quantity at this point
Also, unlike the norm of the internet, the comments on php.net are generally VERY useful, containing awesome functions, examples, explanations, fixes, and bug reports that will often go well beyond the 'official' documentation.

Be sure to read them, I almost always find them a help.
__________________
._-zro
zro@redtv
zro.redtv.org

"If HTML and the Web made all the online documents look like one huge book, RDF, schema, and inference languages will make all the data in the world look like one huge database"
-Tim Berners-Lee, Weaving the Web, 1999
zro@rtv is offline   Reply With Quote
Old 07-26-2007, 06:43 AM   PM User | #7
StupidRalph
Senior Coder

 
Join Date: Mar 2003
Location: Atlanta
Posts: 1,037
Thanks: 14
Thanked 30 Times in 28 Posts
StupidRalph is on a distinguished road
Quote:
Originally Posted by GJay View Post
the php.net website is quite clever, in that trying to load http://php.net/<function_name> will make a guess if the name you try doesn't exist. I often find myself forgetting the exact name of a function and find that really useful.
Quote:
Originally Posted by zro@rtv View Post
Also, unlike the norm of the internet, the comments on php.net are generally VERY useful, containing awesome functions, examples, explanations, fixes, and bug reports that will often go well beyond the 'official' documentation.

Be sure to read them, I almost always find them a help.
Agreed! Especially....well with both of 'em. I'm always forgetting the names of the obscure functions and the comments are a gold mine. Especially, if you need a new function that doesn't exist in your version of PHP.
__________________
Most of my questions/posts are fairly straightforward and simple. I post long verbose messages in an attempt to be thorough.
StupidRalph is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:49 PM.


Advertisement
Log in to turn off these ads.