Jump to content

Simple count problem


squiblo

Recommended Posts

<?php session_start(); include('../../connect.php');
//example string.......           6/8/32/54/(*split*)42
$array = explode("(*split*)", $_POST['data']);
//photo id's to remove (in array form)
$pids_array = $array[0];
//album id to remove from
$aid = $array[1];
$pids = explode("/", $pids_array);
die(count($pids));
?>

For some reason, nothing is outputted, but if I change the line

die(count($pids));

to something like

die($pids[3]);

I will get an output.

Link to comment
https://forums.phpfreaks.com/topic/208748-simple-count-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.