News
Forums
Search
Members
Sign Up
My Code Newbie
Username
Password
Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET
C.N. Friends
Planet Rome
Link to Us!
Code Newbie
Code Forums
>
Application and Web Development
>
PHP
Easy way to tell the data type of a string?
User Name
Remember Me?
Password
Register
FAQ
Calendar
Search
Today's Posts
Mark Forums Read
LinkBack
Thread Tools
Display Modes
06-16-2004, 04:30 PM
#
1
(
permalink
)
Epsilon
Regular Contributor
Join Date: Mar 2003
Location: Las Vegas, NV
Posts: 127
Easy way to tell the data type of a string?
I want to make sure that a variable passed from a form is an integer. No letter characters and no doubles. There must be a function for this?
__________________
--Epsilon--
Epsilon
View Public Profile
Visit Epsilon's homepage!
Find More Posts by Epsilon
06-16-2004, 04:52 PM
#
2
(
permalink
)
Epsilon
Regular Contributor
Join Date: Mar 2003
Location: Las Vegas, NV
Posts: 127
Nevermind, is_int()
I was just having some trouble finding it in the PHP docs.
__________________
--Epsilon--
Epsilon
View Public Profile
Visit Epsilon's homepage!
Find More Posts by Epsilon
06-16-2004, 05:21 PM
#
3
(
permalink
)
bdl
Senior Contributor
Join Date: May 2002
Location: vta.ca.usa
Posts: 555
Actually, in this case you want to use
is_numeric()
, since any value passed in a form is treated as a string.
bdl
View Public Profile
Find More Posts by bdl
Bookmarks
Digg
del.icio.us
StumbleUpon
Google
«
Previous Thread
|
Next Thread
»
Thread Tools
Show Printable Version
Email this Page
Display Modes
Linear Mode
Switch to Hybrid Mode
Switch to Threaded Mode
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
Trackbacks
are
On
Pingbacks
are
On
Refbacks
are
On
Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Help for another program
Androto
Standard C, C++
54
10-15-2004
07:21 AM
From C to Java
HighterDK
Java
11
07-13-2004
07:15 PM
All times are GMT -8. The time now is
03:14 AM
.
Contact Us
-
CodeNewbie.com
-
Archive
-
Top
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by
vBSEO
3.0.0 RC8
Copyright © 2000-2008,
Milano Interactive
Web Hosting provided by
Portal 360 Web Hosting
LinkBack
LinkBack URL
About LinkBacks