Jump to content

Search the Community

Showing results for tags 'order list id and ascending'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hi all, I'm trying to order a list by Id and ascending and i dont figure out how, everything i try is not working! please help this is the link with ejemplo: Producto 3 was last inserted and it showing appear first... and should appear last... http://rumnorte.es/office/estimate/8cea8fec621d501c0f3e560fabe120ead56d4755 Here is the code: <?php foreach (DB::table('options')->get() as $o) { $data[$o->option_name] = "".$o->option_value.""; } ?> <tbody> <?php $total=0; $index = 1; $totalfinal = 0; ?> @foreach ($products as $pro) <tr> <td>{{$index}}</td> <td> <dl> <dt>{{ $pro->product_name }}</dt> <dd>{{ $pro->product_description }}</dd> </dl> </td> <td class="text-right">{{ $pro->unit }}</td> <td class="text-right"><?php echo $data['currencysymbol']; ?> <?php echo number_format($pro->cost, 2, '.', ','); ?></td> <td class="text-right"><?php echo $data['currencysymbol']; ?> <?php echo number_format($pro->unit*$pro->cost, 2, '.', ','); ?></td> </tr> <?php $total += $pro->unit*$pro->cost; $index++; ?> @endforeach </tbody> Any advice really welcome!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.