Reputation: 845
I know how to redirect/load with this code'
header('Location: http://www.someURL.com');
But what about using with strings?
$edit_invoice = $invoice->invoice->links->edit;
header( 'Location: '.$edit_invoice.' ) ;
I'm using Freshbooks API library in case you're wondering..
Upvotes: 0
Views: 126
Reputation: 627
You have an extra apostrophe. header( 'Location: '.$edit_invoice ) ;
Upvotes: 1
Reputation: 4301
The way you have the string version set up right now won't work, because you're starting a new string at the end of calling the header()
function.
header('Location: ' . $edit_invoice);
Should work, as long as $edit_invoice
is a valid link.
Upvotes: 0