Hi all,

I got this code and try to add a +1 to the .$order_details_arr[0])

| <a href="<?php echo $html->url('/admin/order_products/view_details/'.$order_details_arr[0]); ?>">Next</a>


Basically I want to be able to show a URL that will be the .$order_details_arr[0]) result + 1 so the link will link to the next order id in the db.

Recommended Answers

All 4 Replies

Member Avatar for diafol

use code tags the above is beyond comprehension (for me at least)

<a href="<?php echo $html->url('/admin/order_products/view_details/'.$order_details_arr[0]['Order']['id']); ?>">Next</a>

Im trying to figure the mathematical function to be able to do plus one (+1) to this mysql query result

.$order_details_arr[0]['Order']['id']
Member Avatar for diafol
$myval = $order_details_arr[0]['Order']['id'] + 1;

Is that it?

<a href="<?php echo $html->url('/admin/order_products/view_details/'.$myval); ?>">Next</a>

It work perfectly, I did try something simmilar earlier but wasnt placing the $myval = $order_details_arr[0] + 1; at the right place and I also tought that I could embed directly in the url the +1

Thanks a bunch!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.