Jump to content

Recommended Posts

hi, I have recently outsourced a site and having put it live have found that its outputting a number instead of a county from the database, the numbers are coming from an array that converts each county to a number for storing in the database but doesnt seem to be converting them back to text when outputted, pls help as website has gone live & looks very bad, cant get in touch with freelancer!

Link to comment
https://forums.phpfreaks.com/topic/62826-solved-outputting-from-array/
Share on other sites

hope this is what you need not too familiar with php!!

 

if($instituteId == '')

{

$_SESSION['sessMsg'] = "Invalid Request";

header("location: index.php");

exit();

}

else

{

$sqlSR = " select * from tbl_course where instituteId = '$instituteId' and status = 1 ";

$resSR = executeQuery(dopaging($sqlSR,10));

$noOfRows = mysql_num_rows($resSR);

}

 

?>             

 

 

<?php

$sqlID = "select * from tbl_institute where instituteId = '$instituteId' ";

$resID = executeQuery($sqlID);

if($rowID = mysql_fetch_array($resID)){

?>

 

 

 

 

<?php } }?>

                    <strong>Address</strong>:

  <br/>

  <?=$rowID['address']?><br/>

  <?=$rowID['county']?><br/>

the array is stored in an include file as the following..

 

$arrCounty = array(

'1'=>"***Republic of Ireland***",

'2'=>"Carlow ",

'3'=>"Cavan ",

'4'=>"Clare ",

'5'=>"County Cork ",

'6'=>"Cork City",

'7'=>"Donegal",

'8'=>"County Dublin",

'9'=>"South Dublin City",

'10'=>"North Dublin City",

'11'=>"Dublin City Centre",

'12'=>"County Galway ",

'13'=>"Galway City",

'14'=>"Kerry ",

'15'=>"Kildare ",

'16'=>"Kilkenny ",

'17'=>"Laois ",

'18'=>"Leitrim ",

'19'=>"Limerick ",

'20'=>"Limerick City",

'21'=>"Longford ",

'22'=>"Louth ",

'23'=>"Mayo ",

'24'=>"Meath ",

'25'=>"Monaghan ",

'26'=>"Offaly ",

'27'=>"Roscommon ",

'28'=>"Sligo ",

'29'=>"Tipperary",

'30'=>"Waterford ",

'31'=>"Westmeath",

'32'=>"Athlone ",

'33'=>"Wicklow",

'34'=>"***Northern Ireland***",

'35'=>"Antrim",

'36'=>"Belfast City",

'37'=>"Armagh",

'38'=>"Down",

'39'=>"Fermanagh",

'40'=>"Londonderry",

'41'=>"Tyrone"

);

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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