我正在使用数组,我打开它并开始使用此代码打印出来...
<html>
<?php
$file=fopen("curr_enroll_fall.csv", "r");
$records[]=fgetcsv($file);
print_r($records);
?>
</html>
这给了我这个输出......
Array ( [0] => Array ( [0] => Subj
[1] => #
[2] => Title
[3] => Comp Numb
[4] => Sec
[5] => Lec Lab
[6] => Camp Code
[7] => Max Enrollment
[8] => Current Enrollment
[9] => Start Time
[10] => End Time
[11] => Days
[12] => Credits
[13] => Bldg
[14] => Room
[15] => Instructor
[16] => NetId
[17] => Email
)
)
我希望能够打印出某个标题下的所有项目,例如打印出所有标题。任何帮助都会很棒!
答案 0 :(得分:2)
试试这个:
$scope.sync = $scope.tasks.$db.replicate.sync('http://www.server.info:5984/' + dbName,
{live: true, "auth": {username:"john", password:"secret"}})
.on('error', function (err) {
});