oracle765
-
Posts
219 -
Joined
-
Last visited
Posts posted by oracle765
-
-
Hi Professionals
I have a date calculation to calculate the number of days between two dates which works fine.
When I try to put this into MySQL query with the " + $num_of_days + " it does not work
any ideas where im going wrong as the query return nothing(code attached)
thanks in advance
-
Update
managed to get the startdate and enddate through I had spelt them wrong as in stardate endate but still cannot figure out how to pass the ages through
-
Hi PravinS
Thanks for that I can get some of them to work now, because someone else wrote this code I cannot figure out how to get the ages to pass through and also the startdate and enddate are still empty, the rest are fine. you can see what I mean by the ages as they are dynamic somehow with the drop down box on compareandchoose.com.au/insurance.php
I have included my webpage for clarity sake
-
Hi All
I have two webpages which I have attached some of the code, when I try to echo out the variables they seem to not be working, am I doing something wrong here
thanks
-
hi Mac_gyver
I have no idea what you mean lol
so I can do
switch if $policytypeid = substr($policytypeid, -1); then ??
-
I am not sure what you mean by 5 10 or higher
that is the only values there are
-
Hi Professionals
I am trying to validate a policy type variable and I am not sure which way to go around it, is there a better way through a switch or case statement or something
code attached
and thanks in advance
-
that's brilliant that worked thankyou
-
Hi Mac_gyver
Thanks so much that now gets the output in the attached file
But somehow my for loop does not seem to present it nicely, any ideas
Thanks
-
ok I have tried to make this more simple for clarity sake, I am downloading a straightforward json file.
when I put the url into the browser it prompts me to open or save the file which is fine
when I run the php file I try to do the same and output the data to screen but trouble is it is blank
am I missing something here is the very basic page
-
Hi again
Now I just get Agents , just a comma and Price is fine, no name showing, I thought it might have been agents supposed to show a capital A but that didn't work either
you can see on www.compareandchoose.com.au/skyscanner.php
here is my code for clarity sake
once again many thanks
-
ok thanks just on the last part you say
You'll also get the flight carrier from the $array['Legs'] array, again each carrier has their own unique id which you need to loop up within the $array['Carriers'] array
could you explain what you mean by loop up with that array, sorry to be a pain but arrays are my weekpoint lol
thanks again your an excellent role model to this forum
-
sorry didn't realise, do you want me to delete this thread and post in other thread
-
hi CH0cu3r
Thanks for that as it now extracts results, but as you can see it just produces lines and lines of prices, airlines etc, how do you actually know which Agent, flight, airline, price etc is linked to which
EG Image, British airways, from, to, departure, arrival, price etc <br>
Image, Air Lingus, from, to, departure, arrival, price etc <br> and so on
again thanks in advance you have been a massive help in figuring out my array problems which I am totally new to
-
yes I did that and wrote a function but it does not work
-
Hi Professionals
I am trying to extract data between two points so I can write this to another file
what I am looking to do is take everything between ### CPU ### and ### Services ###
I can echo the string out to screen oj but the function I call just produces a blank screen, any ideas
here is the php and the file
-
I have the following semi colon delimited file, in fact hundreds of them which are all the same format
Does PHP have the facility to open this file and split it into 3 separate excel or csv files
EG
For the OS
Machine, Manufacturer, Model, Current User, OS, Version, Install Date
DETAILS HERE
For the CPU
Model, Socket Designation,Status, 3 of Cores, 3 of Logical Processors
DETAILS HERE
and for the Servicea
Service,State,Install Date, Install Path
DETAILS HERE
-
Hi Ch0cu3r
I have been trying to extract all the information to provide the customer with a readable itinerary however the array within arrays has me so confused it just will not work.
here is what I have so far to try and loop through the file
thanks
Alan
-
I forgot to set json to true sorry, that managed to get the price
-
thanks again but it still comes up with that fatal error for some reason!
I have included my whole page just incase I am missing something as you can see at www.compareandchoose.com.au/skyscanner.php my end goal is to provide an itinery to the users so they can go and book, but the out put in that array is a bit confusing for me to try and present nicely to them
-
if tried
foreach ($array['Itineraries']['PricingOptions'] as $arr) {
echo "<b> Price </b> " .$arr['Price'], " <br> price </b>,$arr['Price'] ?> <br />
<?php
}
?>
to try and echo out the Price twice but I just get an error saying
Fatal Error: Cannot use object of type stdClass as array in /home/etc/etc/skyscanner.php
-
hey Ch0cu3r
That's great it works, so how as you can now see via www.compareandchoose.com.au/skyscanner.php
How do you actually get rid of all the => <> etc to pull the destination and price out of the arrays to present to the users
-
because all I see in my screen when using this code is "poll data"
-
thanks for that, but to be honest that's way beyond me lol
do you do any freelance work, I posted something like this but never got a reply in the freelance section
thankyou
php mysql variable not working
in PHP Coding Help
Posted
hi I am not sure what you mean I did not write the code I am trying to correct it but the dates in the database are stored as varchar yes