Return to Snippet

Revision: 49342
at July 20, 2011 08:03 by stewartduffy


Initial Code
<?php

$data = array(
  "Performance Coaching",
  "Principal Responsibilities of Leadership",
  "Strategic Performance Template",
  "Team Performance Compact",
  "Team Performance One",
  "Management Performance Compact",
  "Management Performance One",
  "Leadership Performance Compact",
  "Leadership Performance One",
  "Executive Performance Compact",
  "Executive Performance One",			
  "How to Advance the Performance of a Team",			
  "Performance Coaching",			
  "Principal Responsibilities of Leadership",			
  "Strategic Performance Template",			
  "Team Performance Compact",			
  "Team Performance",			
  "Sales Performance Compact",			
  "Sales Performance",			
  "Sales Manager Compact",			
  "Sales Manager",			
  "Management Performance Compact",			
  "Management Performance",			
  "Leadership Performance Compact",			
  "Leadership Performance",			
  "Executive Performance Compact",			
  "Executive Performance",			
  "How to Advance the Performance of a Team",			
  "Performance Coaching",			
  "Pro-Sport compact",			
  "Pro Sport",			
  "Advanced Performer",			
  "Performance Coaching",			
  "The Principal Responsibilities of Coaching",			
  "Pro-Sport Coach compact",			
  "Pro-Sport Coach",
  "How to Advance the Performance of an Athlete"
);


//$data_new = array();
$i = 0;

foreach($data as $d){
	//echo $d;
	$data_new[$i] = array(
												"name" 					=> $d,
												"ref"  					=> "",
												"bpm"  					=> "",
												"dpm"  					=> "",
												"info_pack"  		=> "",
												"tdm"  					=> "",
												"description"  	=> ""
												);
$i++;
}

echo "<pre>";
print_r($data_new);
echo "</pre>";

$api = new PodAPI('programme_content', 'php');
$api->import($data_new);



?>

Initial URL

                                

Initial Description
Function to import array of php data to pod table

Initial Title
Import php array into pod table, wordpress

Initial Tags
php, wordpress, array

Initial Language
PHP