may be you can try this code
<?php
$var = [11, 10, 20, 30, 40];
for($i=0; $i<count($var)-1; $i++) {
if($var[$i]>$var[($i+1)]) {
echo "var $var[$i] > var ".$var[($i+1)];
}
}
?>
More Related Contents:
- Loop dirs and write xml of content files in php [closed]
- How to convert array to SimpleXML
- Best XML Parser for PHP [duplicate]
- How do you parse and process HTML/XML in PHP?
- Accessing @attribute from SimpleXML
- How to convert XML into array in PHP?
- Selecting a css class with xpath
- How to use XMLReader in PHP?
- PHP: How to handle
- Error: “Input is not proper UTF-8, indicate encoding !” using PHP’s simplexml_load_string
- SimpleXML and print_r() – why is this empty?
- Is there any way to convert json to xml in PHP?
- Fix malformed XML in PHP before processing using DOMDocument functions
- preg_match(); – Unknown modifier ‘+’ [duplicate]
- Accessing @attribute from SimpleXML
- remove xml version tag when a xml is created in php
- Is htmlentities() sufficient for creating xml-safe values?
- Updating XML node with PHP
- What is the fastest XML parser in PHP?
- PHP – Processing Invalid XML
- XML Parse Error – Extra content at the end of the document
- Using SimpleXML to create an XML object from scratch
- Get MySQL database output via PHP to XML
- How to setup a cron job in Magento module?
- converting SOAP XML response to a PHP object or array
- How do I see the actual XML generated by PHP SOAP Client Class?
- Format output of $SimpleXML->asXML(); [duplicate]
- Remove & from string when writing to xml in PHP
- How to parse SOAP response without SoapClient
- How can I send SOAP XML via Curl and PHP?