<html>
<head>
<title>Array Functions</title>
</head>
<body>
<?php $array1 = array(4,8,15,16,23,42); ?>
Count: <?php echo count($array1); ?><br />
Max value: <?php echo max($array1); ?><br />
Min value: <?php echo min($array1); ?><br />
<br />
Sort: <?php sort($array1); print_r($array1); ?><br />
Reverse Sort: <?php rsort($array1); print_r($array1); ?><br />
<br />
Implode: <?php echo $string1 = implode(" * ", $array1); ?><br />
Explode: <?php print_r(explode(" * ", $string1)); ?><br />
<br />
___________________________________________________________________________
<?php
// Server in the this format: <computer>\<instance name> or
// <server>,<port> when using a non default port number
$server = '.\SQLEXPRESS';
// Connect to MSSQL
$link = mssql_connect($server, 'sa', 'phpfi');
if (!$link) {
die('Something went wrong while connecting to MSSQL');
}
?>
___________________________________________________________________________
In array: <?php echo in_array(15, $array1); // returns T/F ?><br />
</body>
</html>
I have the above.
If I comment out that which is between the lines,
everything works fine, and I get a value on the web browser for the call out at the end.
with the part between the lines I have inserted here un-commented, the page stops
before the last line of code, and I get no message for the array at the end.
I've tried everything I can think of to get a connection through php to the database.
can someone help me?