How to find the length of a string?

strlen() function used to find the length of a string

I am having a problem with the following lines where car is a String array which has not been initialized/has no elements.

String car [];
System.out.println(car.length);

What is a possible solution?

PHP Php, string 0 Answer

What Is a Session?

A session is a logical object created by the PHP engine to allow you to preserve data across subsequent HTTP requests. Sessions are commonly used to store temporary data to allow multiple PHP pages to offer a complete functional transaction for the same visitor.

PHP Php , Session 0 Answer

How can we connect to a MySQL database from a PHP script?

I have my php code like this to connect my server database

<?php
    $con=mysqli_connect("","username" ,"password","databasename");
    if (mysqli_connect_errno())
     {
      echo "Failed to connect to MySQL: " . mysqli_connect_error();
     }
     ?>

But it displayed "Failed to connect to MYSQL", what is wrong with this code?, first time i am trying it in web server, whereas my localhost worked perfectly. Anyone has some suggestion?

PHP Php , Mysql 0 Answer