Use this
while($row=mysql_fetch_array($sql1)){
$days= $row['attending_days'];
$days1 = explode(',' , trim($days));
echo count($days1);
}
why are you using echo with all lines?
More Related Contents:
- mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/virtua15/public_html/main/1515/dafreg.php on line 9 [duplicate]
- Passing $_GET value to $_POST
- How do I implement basic “Long Polling”?
- Why would $_FILES be empty when uploading files to PHP?
- How to convert JSON string to array
- What are the best practices for avoiding xss attacks in a PHP site [closed]
- PHP foreach loop key value
- How to execute two mysql queries as one in PHP/MYSQL?
- urlencode vs rawurlencode?
- Zero-pad digits in string
- How to attach two or multiple files and send mail in PHP [duplicate]
- How to check whether the user uploaded a file in PHP?
- SSL operation failed with code 1: dh key too small
- Can’t pass mysqli connection in session in php
- select outgoing ip for curl request
- Get last modified file in a directory
- PDO fetchAll group key-value pairs into assoc array
- Converting an array from one to multi-dimensional based on parent ID values
- Clean URLs for search query?
- Post to a facebook page without “manage_pages” permission using php
- What literal characters should be escaped in a regex?
- Call another PHP script and return control to user before the other script completes
- Posting JSON objects to Symfony 2
- case-insensitive array_unique
- How can I install mcrypt under PHP7? Laravel needs it
- Why does PHP allow “incompatible” constructors?
- Eloquent Parent-Child relationship on same model
- Is it possible to execute PHP with extension file.php.jpg?
- Conditionally add associative element to array
- PHP Get Content of HTTP 400 Response