Using PHP to find a word and then capture data which follows
Posted: Sat Nov 01, 2008 12:39 pm
Hi everyone,
I am trying to construct some PHP which can search for a specific word within a bit of chunk of data which I am calling using this code:
<?php
include "./auth.php";
x_load("order");
$order_data = func_select_order(Order Number goes Here);
echo $order_data["details"];
?>
That code basically calls up credit card details of Customer X which is as far as I've gotten.
The next step is to take that data and search for the word "{CardNumber}:" and then capture the first six digits which come immediately after. I then need to be able to take those six digits and pass them into a string of an <a href=""> call that comes later in the page.
I'm completely lost though...any ideas?
I am trying to construct some PHP which can search for a specific word within a bit of chunk of data which I am calling using this code:
<?php
include "./auth.php";
x_load("order");
$order_data = func_select_order(Order Number goes Here);
echo $order_data["details"];
?>
That code basically calls up credit card details of Customer X which is as far as I've gotten.
The next step is to take that data and search for the word "{CardNumber}:" and then capture the first six digits which come immediately after. I then need to be able to take those six digits and pass them into a string of an <a href=""> call that comes later in the page.
I'm completely lost though...any ideas?