ddrudik
asked on
PHP equivalent of Classic ASP array member reference
In Classic ASP this code would print "s" to the browser window:
<%
Set regEx = New RegExp
regEx.Pattern = "s"
Response.Write regEx.Execute("test")(0)
%>
What would be the PHP equivalent (if any) of the array reference above?
Note my goal with this example is to understand if it is possible directly address a member of a resulting array in one step, or if it is required to use more than one step such as:
<?php
preg_match('/s/','test',$m atch);
echo $match[0];
?>
<%
Set regEx = New RegExp
regEx.Pattern = "s"
Response.Write regEx.Execute("test")(0)
%>
What would be the PHP equivalent (if any) of the array reference above?
Note my goal with this example is to understand if it is possible directly address a member of a resulting array in one step, or if it is required to use more than one step such as:
<?php
preg_match('/s/','test',$m
echo $match[0];
?>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I was hoping the answer was different, but thanks for the quick help.
https://www.experts-exchange.com/questions/22910308/RegEx-ASP-to-PHP-Conversion.html