Hi,
I'm using php 4.4.4. How do i check if a given variable is an array
or simply a scalar?
Thanks, - Dave 4 19229
On Jun 28, 5:21 pm, "laredotorn...@zipmail.com"
<laredotorn...@zipmail.comwrote:
Hi,
I'm using php 4.4.4. How do i check if a given variable is an array
or simply a scalar?
Thanks, - Dave
is_array ?
there are others:
is_float()
is_int()
is_string()
is_object()
On Thu, 28 Jun 2007 18:50:36 +0200, shimmyshack <ma********@gmail.com>
wrote:
On Jun 28, 5:21 pm, "laredotorn...@zipmail.com"
<laredotorn...@zipmail.comwrote:
>Hi,
I'm using php 4.4.4. How do i check if a given variable is an array or simply a scalar?
Thanks, - Dave
is_array ?
there are others:
is_float()
is_int()
is_string()
is_object()
And don;t forget: is_scalar()
--
Rik Wasmus
On Jun 28, 6:15 pm, Rik <luiheidsgoe...@hotmail.comwrote:
On Thu, 28 Jun 2007 18:50:36 +0200, shimmyshack <matt.fa...@gmail.com>
wrote:
On Jun 28, 5:21 pm, "laredotorn...@zipmail.com"
<laredotorn...@zipmail.comwrote:
Hi,
I'm using php 4.4.4. How do i check if a given variable is an array
or simply a scalar?
Thanks, - Dave
is_array ?
there are others:
is_float()
is_int()
is_string()
is_object()
And don;t forget: is_scalar()
--
Rik Wasmus
yeah theres loads of is_
theres another one
is_a_pain_to_remember_them_all
but it always returns true for me
On Thu, 28 Jun 2007 19:19:06 +0200, shimmyshack <ma********@gmail.com>
wrote:
On Jun 28, 6:15 pm, Rik <luiheidsgoe...@hotmail.comwrote:
>On Thu, 28 Jun 2007 18:50:36 +0200, shimmyshack <matt.fa...@gmail.com> wrote:
On Jun 28, 5:21 pm, "laredotorn...@zipmail.com"
<laredotorn...@zipmail.comwrote: Hi,
>I'm using php 4.4.4. How do i check if a given variable is an array or simply a scalar?
>Thanks, - Dave
is_array ?
there are others:
is_float()
is_int()
is_string()
is_object()
And don;t forget: is_scalar()
yeah theres loads of is_
theres another one
is_a_pain_to_remember_them_all
but it always returns true for me
In your standard function library yeah? ;)
Just pointed it out, as it's normally no problem in PHP to juggle types as
one goes, but the difference between scalar & non-scalar is often
significant for functions, so a simple test is_scalar() offcourse beats
(!is_array()&&!is_object()&&!is_resource()) or (is_string()||is_float()).
--
Rik Wasmus This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Nuno Paquete |
last post by:
Hi group.
I'm using this code to see if is there any parameter for variable "menu":
if($_GET == "downloads")
....
But this code log errors if there is no parameter passed (this heappens at
the first time the page is loaded).
I tryed this code:
|
by: Stefan Richter |
last post by:
Hi,
I am looking for a good function to check if a entered value is
a money value - meaning it's a decimal with no more then 2 digits after the point.
Thanks,
Stefan
|
by: Dave |
last post by:
Can I determine if an array of image links is already in memory
without using cookies or a hidden frameset? Scenario: visitor starts
with Home page, images (links) for navigation pre-load no problem.
Visitor follows search engine link and does not land on Home, thus no
links. But if I put the same code on every page to allow for that,
won't...
|
by: tabonni |
last post by:
I want to check each button groups and save the checked value into a 2
dimensional array. But, it doesn't work. Could anyone tell me what's
wrong with my code. My code is as follow:
<html>
<body>
<script language="javascript">
<!--
var temp = new Array(2)
var status = new Array();
|
by: JGH |
last post by:
How can I check if a key is defined in an associative array?
var users = new array();
users = "Joe Blow";
users = "John Doe";
users = "Jane Doe";
function isUser (userID)
{
if (?????)
| |
by: Antony |
last post by:
compiler£ºVisual Studio.Net 2003 (VC7.1)
compile type£ºDebug
problem: wanted more information about the "Run-Time Check Failure
#n",thanks!
Example1:
#include "stdafx.h"
void malice()
{
printf("Hey,you're been attacked.\n");
|
by: wesley |
last post by:
Hi all
I have many check boxes on a page (The number is unknown) I want to
send the results to another page. I will have to name the checkboxes
using an array because i dont know how many check boxes there will be.
I decided to make the array a $_SESSION variable, but the results are
not going to the next page... any suggestions?
Thanks Wes
|
by: cpptutor2000 |
last post by:
Could some PHP guru please help me? I have very standard PHP - MySQL
application that reads in some data from a table and for each row, puts
a check box at the start of the row. Now the check boxes are variable
in number, depending only on the number of current records in the
database table. My question is: how do I count the number of check...
|
by: JasonC |
last post by:
Hi,
First time posting here so please be gentle!
I wish to check a variable for a number of words that are in a array.
Not sure if this is the best way to do it, but this is what i have.
I have my own counter system that counts every visitor, but some of these visits are from BOTS, spiders..
|
by: yhlove |
last post by:
Hi
I declared an array as follows:
dim a as integer()
somewhere else in my program I have the following command:
redim preserve a(size)
I want to check the array length like that
if a.length 1 then
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |