Link to home
Start Free TrialLog in
Avatar of ISHUC
ISHUCFlag for United States of America

asked on

Could someone please explain this to me?

Specifically, I don't under stand what these rows are supposed to be doing.

what is the <?= for?

Is this PHP,javascript,...

<h2><?= $data_row->title ?></h2>
<p><?= $data_row->body ?></p>
<?php
	# Dataset ID is present
	if ( !empty( $id ) ) {
		# Get data from database and print out
		$query = mysql_query( "SELECT * FROM ". DBTABLE ." WHERE id=$id", $db_server );
		if ( mysql_numrows( $query ) == 1 ) {
			$data_row = mysql_fetch_object( $query );
			?>
<h2><?= $data_row->title ?></h2>
<p><?= $data_row->body ?></p>

Open in new window

SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ISHUC

ASKER

I am trying to run this in PHP5 which I understand that needs to use mysqli instead of mysql commands.  Is the $data_row->title usable in PHP5 or do I need to use the mysqli with an execute command?
Avatar of ISHUC

ASKER

I mean extract() not execute()
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial