try this
<?php
$str = 'a,b,c,d';
$a=(explode(',', $str));
echo $a[0]."<br/>";
echo $a[1]."<br/>";
echo $a[2]."<br/>";
echo $a[3]."<br/>";
?>
or better store it in an array and then using key value echo it simple....try this out
what is this common.php it is located in includes folder where the class files are located.I dont understand please help me i am new to php and it contains the following coading in it.Why we use it?
<?php
ob_start();
session_start();
//$_SERVER['DOCUMENT_ROOT'] = "/home/gt5com/public_html";
if(!defined("_MAINSITEPATH_"))
define("_MAINSITEPATH_",$_SERVER['DOCUMENT_ROOT']."/talent6/includes/");
if(!defined("EMAIL_LINEFEED"))
define("EMAIL_LINEFEED",'CRLF');
if(!defined("EMAIL_TRANSPORT"))
define("EMAIL_TRANSPORT",'mime');
if(!defined("CHARSET"))
define("CHARSET",'iso-8859-1');
define('PREVNEXT_BUTTON_PREV', '<b><<</b>');
define('PREVNEXT_BUTTON_NEXT', '<b>>></b>');
define('TEXT_DISPLAY_NUMBER_OF_INVITES', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> Invites)');
define('TEXT_DISPLAY_NUMBER_OF_INBOX', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> Mails)');
define('TEXT_DISPLAY_NUMBER_OF_FIND', 'Search Result <b>%d</b> to <b>%d</b> (of <b>%d</b> Matches)');
define('TEXT_DISPLAY_NUMBER_OF_UPEVENTS', 'UpComing <b>%d</b> to <b>%d</b> (of <b>%d</b> Events)');
define('TEXT_DISPLAY_NUMBER_OF_PASTEVENTS', 'Past <b>%d</b> to <b>%d</b> (of <b>%d</b> Events)');
define('TEXT_DISPLAY_NUMBER_OF_COMMENTS', 'Displaying <b>%d</b> to <b>%d</b> Comment(s)');
define('TEXT_DISPLAY_NUMBER_OF_FAVORITES', 'Listing <b>%d</b> to <b>%d</b> Favorites(s)');
define('TEXT_DISPLAY_NUMBER_OF_ADDRESS', 'Listing <b>%d</b> to <b>%d</b> Address(s)');
define('TEXT_RESULT_PAGE', 'Page %s of %d');
define('TEXT_DISPLAY_NUMBER_OF_RESULT', '<b>%d</b> to <b>%d</b> (of <b>%d</b>)');
define('TEXT_RESULT_PAGE', 'Page %s of %d');
define('TEXT_RESULT_PAGE1', 'Result Pages:');
define('PREVNEXT_TITLE_FIRST_PAGE', 'First Page');
define('PREVNEXT_TITLE_PREVIOUS_PAGE', 'Previous Page');
define('PREVNEXT_TITLE_NEXT_PAGE', 'Next Page');
define('PREVNEXT_TITLE_LAST_PAGE', 'Last Page');
define('PREVNEXT_TITLE_PAGE_NO', 'Page %d');
define('PREVNEXT_TITLE_PREV_SET_OF_NO_PAGE', 'Previous Set of %d Pages');
define('PREVNEXT_TITLE_NEXT_SET_OF_NO_PAGE', 'Next Set of %d Pages');
define('PREVNEXT_BUTTON_FIRST', '<<FIRST');
define('PREVNEXT_BUTTON_PREV1', '[<< Prev]');
define('PREVNEXT_BUTTON_NEXT1', '[Next >>]');
define('PREVNEXT_BUTTON_LAST', 'LAST>>');
include_once _MAINSITEPATH_."config.php";
include_once _MAINSITEPATH_."dbNames.php";
include_once $config['SiteClassPath']."class.SqlFunctions.php";
include_once $config['SiteClassPath']."class.General.php";
include_once $config['SiteClassPath']."class.Mime.php";
include_once $config['SiteLocalPath']."includes/smarty/Smarty.class.php";
include_once _MAINSITEPATH_."EmailNotificationSend.php";
include_once _MAINSITEPATH_."libmail.php";
//include_once $config['SiteClassPath']."class.Upload.php";
//include_once $config['SiteClassPath']."class.General.php";
global $config;
$objSmarty = new Smarty();
if(isset($_SESSION))
$objSmarty->assign("Session", $_SESSION);
if(!empty($_SESSION['member_id']))
{
$objSmarty->assign("member_id",$_SESSION['member_id']);
}
/*Magic Function for Load All Class Files Start
function __autoload($class_name)
{
require_once $config['SiteClassPath']."class.".trim($class_name).'.php';
}*/
/*Magic Function for Load All Class Files End */
function getWebSettings()
{
global $objSmarty;
$objMysqlFns = new MysqlFns();
$Query = "select * from ".Tmy_Websettings." Limit 0,1";
$Result = $objMysqlFns->ExecuteQuery($Query, "select");
$objSmarty->assign("WebSettings", $Result[0]);
return $Result[0];
} …
i want to know about smarty please tell me the best website or tutorials for that
hi guys im new to php please help me to search friends in an community page where all members are there i dosen't hv d coding plz help me.....send some coading guys
correct
PLZ MAKE CHANGES IN WHILE LOOP INSERT "<SELECT>"
while($nt=mysql_fetch_array($result))
{
echo "<select><option value=$nt[city]>$nt[city]</option>";
}
echo "</select><input type='submit' name='submit' value='Go'><br>";
superb coading sir even i can calculate number of days from my birth