English 中文(简体)
为什么没有计算(美元)的功能?
原标题:why is the count($array) function not counting?

I checked if the variable is an array. I can return desired elements out of the array by going $array[n];

因此,这是一件好事。

但是,在以下法典中,如果我能打上<代码>($array),那么我就拿不到退还的内容。

    //converting string $messages to array: 
    $messagesArr =  explode("<hr/>", $messages);

            if (is_array($messagesArr )){print("<p style= color:red >Array OK<p>");}
        else {print("<p style= color:red >Array not OK<p>");}

    $secondElement = $messagesArr[1]; 
        print("<p style= color:red >second element is: $tweedeElem<p>"); 
            // This  one actually outputs the desired second element of the array

            $amountMess = count($messagesArr);
    print("<p style= color:red >the amount of messages is: $amountMess<p>");
最佳回答
$amountMess = count($messagesArr);

$berichtenArr != $messagesArr

问题回答

在您公布的法典中,你重新将电文放在<条码>中,但要求以另一个变数的<代码>计算。 Arr。 这一变量包含哪些内容? 你们有一杯。

页: 1 Arr:

$berichtenArr = array(blahhhh, foooo, barrrr);

否则,<代码>($berichtenArr)就赢得了任何有用的回报。





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签