How can you use multiple fields in formatter

How can you use multiple fields in formatter

c-myers1c-myers1 Posts: 43Questions: 16Answers: 0

The Server-side snippet at https://datatables.net/examples/server_side/simple.html uses only $d which is a single field from the server table.

I need to display $d but my anchor tag needs to point to a URL composed of something else within the same database row so I have this:

'formatter' => function($d,$row) { $x = $row[9]; return "<a href='https://www.myurl.com?$x'>$d</a>"; }

My implicit assumption is that $row is a PHP array of the record but obviously it's not because this simply returns a blank in the space.

What am I missing out here?

This discussion has been closed.