Search Results

Search found 6679 results on 268 pages for 'echo'.

Page 7/268 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • How to echo Hyperlink Containing a Variable?

    - by John
    Hello, In the code below, I would like to make the word that prints out as the variable "$submittor" a hyperlink to "http://www...com/.../members/index.php?profile=$submittor" . I can't get it to work; I think I'm doing the formatting wrong. How can I do it? Thanks in advance, John echo '<div class="sitename3name">Submitted by '.$submittor.' on '.$dt->format('F j, Y &\nb\sp &\nb\sp g:i a').'</div>';

    Read the article

  • Echo cancellation

    - by Jorg B Jorge
    Can any of you suggest a good and stable echo cancelation package (gnu or not) to be linked with my videoconference application (C/C++) (Windows / Linux / MacOSX) ? My application should be freeware, so i do not want to pay for each user who download the app.

    Read the article

  • PHP: Loop or no loop?

    - by Joseph Robidoux
    In this situation, is it better to use a loop or not? echo "0"; echo "1"; echo "2"; echo "3"; echo "4"; echo "5"; echo "6"; echo "7"; echo "8"; echo "9"; echo "10"; echo "11"; echo "12"; echo "13"; or $number = 0; while ($number != 13) { echo $number; $number = $number + 1; }

    Read the article

  • How to get my list of rows from database to show while using Zend-Paginator

    - by Matto
    I'm fairly new to the world of Zend-Framework, and have taken over a site that is in zend-framework. There is a bug on one of the pages right now and I can not figure it out. I think it has something to do with Zend Paginator, but not sure. This is the code in the controller for the section I am having a problem with: $currentPage = $this->_getParam('page'); $numWebsitesFullOnline = $websites->getWebsitesFullOnline(); $select = $websites->select(); $select->setIntegrityCheck(false); $select->from(array('w' => 'websites'), array('id', 'online', 'kw_adjective', 'kw_name', 'kw_location', 'url', 'email', 'address', 'ftp_server', 'ftp_username', 'ftp_password', 'ftp_folder', 'phone_number', 'indexed', 'youtube_position', 'twitter_user', 'facebook_id', 'video_made', 'image1_id', 'image2_id', 'image3_id', 'bg_color', 'dark_color', 'light_color', 'links_color', 'text_color', 'google_account', 'ganalytics', 'gmaps_status', 'google_position', 'gmap_position', 'hp1', 'hp2', 'hp3', 'hp4', 'hp5', 'hp6', 'hp7', 'hp8', 'hp9', 'hp10', 'about1_id', 'about2_id', 'about3_id', 'tip1_id', 'tip2_id', 'tip3_id', 'contact_texts_id', 'quote_texts_id', 'demographics_id')) ->join(array('d' => 'demographics'), 'w.demographics_id = d.id', array('total_population')) ->order(array('total_population DESC', 'kw_location')); $paginator = new Zend_Paginator(new Zend_Paginator_Adapter_DbSelect($select)); $paginator->setItemCountPerPage(50); $paginator->setCurrentPageNumber($currentPage); $paginator->setPageRange(($paginator->getTotalItemCount() / 50) + 1); $this->view->paginator = $paginator; $numWebsitesOnline = $websites->getWebsitesOnline(); On the php page I have this code to call the websites that are in the database to a list: <p class="red"> Websites online: <?php echo $this->numOnline; ?> </p> <?php print_r(count($this->paginator)); ?> <?php if(count($this->paginator)): ?> <table class="table-list"> <?php foreach($this->paginator as $item): ?> <tr> <?php if($this->userIsAllowedAction('websites', 'reload')): ?> <td class="center noborder w30"> <img class="hidden" src="<?php echo $this->baseUrl() . '/images/loader.gif' ?>" alt="Loading..."/><a class="reload" title="refresh" href="<?php echo $this->baseUrl(); ?>/utils/ui/refresh-website.php" rel="<?php echo urlencode('http://' . $item['url'] . '/install.php'); ?>,<?php echo urlencode($item['ftp_server']); ?>,<?php echo $item['ftp_username']; ?>,<?php echo $item['ftp_password']; ?>,<?php echo $item['ftp_folder']; ?>,<?php echo $this->baseUrl(); ?>,<?php echo $item['id']; ?>"><img src="<?php echo $this->baseUrl(); ?>/images/icon-refresh.png" alt="Refresh"/></a> </td> <?php endif; ?> <td class="center noborder w30"> <?php if($this->userIsAllowedAction('websites', 'edit')): ?><a title="Edit" href="<?php echo $this->url(array('controller' => 'websites', 'action' => 'edit', 'id' => $item['id'])); ?>"><img src="<?php echo $this->baseUrl(); ?>/images/icon-edit.png" alt="Edit"/></a><?php endif; ?> </td> <td class="center noborder w30"> <?php if($this->userIsAllowedAction('websites', 'remove')): ?><a title="Remove" href="<?php echo $this->url(array('controller' => 'websites', 'action' => 'remove', 'id' => $item['id'])); ?>"><img src="<?php echo $this->baseUrl(); ?>/images/icon-delete.png" alt="Remove"/></a><?php endif; ?> </td> <td> <?php if($item['online']): ?> <span class="hidden"><?php echo trim($this->escape($item['kw_adjective'] . $item['kw_name'])); ?></span><a class="goto-website" href="http://<?php echo $item['url']; ?>" target="_blank"><?php echo $this->escape($item['kw_location']); ?></a> <?php else: ?> <?php echo $this->escape($item['kw_location']); ?> <?php endif; ?> </td> <td class="center population"> <?php if($item['total_population'] >= 0) echo $item['total_population']; ?> </td> <td class="center"> <?php if(!empty($item['url'])): ?><img src="<?php echo $this->baseUrl(); ?>/images/check_mark.png" alt="DONE"/><?php endif; ?> </td> <td class="center"> <?php if(!empty($item['email'])): ?><img src="<?php echo $this->baseUrl(); ?>/images/check_mark.png" alt="DONE"/><?php endif; ?> </td> <td class="center"> <?php if($item['demographics_id']): ?><img src="<?php echo $this->baseUrl(); ?>/images/check_mark.png" alt="DONE"/><?php endif; ?> </td> <td class="center"> <?php if($item['hp1'] && $item['hp2'] && $item['hp3'] && $item['hp4'] && $item['hp5'] && $item['hp6'] && $item['hp7'] && $item['hp8'] && $item['hp9'] && $item['hp10'] && $item['about1_id'] && $item['about2_id'] && $item['about3_id'] && $item['tip1_id'] && $item['tip2_id'] && $item['tip3_id'] && $item['contact_texts_id'] && $item['quote_texts_id']): ?><img src="<?php echo $this->baseUrl(); ?>/images/check_mark.png" alt="DONE"/><?php endif; ?> </td> <td class="center"> <?php if(file_exists($_SERVER['DOCUMENT_ROOT'] . $this->baseUrl() . Zend_Registry::get('assets_base_path') . '/' . $item['id'] . '/header.jpg')): ?><img src="<?php echo $this->baseUrl(); ?>/images/check_mark.png" alt="DONE"/><?php endif; ?> </td> <td class="center"> <?php if(($item['bg_color'] != '' && $item['bg_color'] != 'e6e6e6') || ($item['dark_color'] != '' && $item['dark_color'] != '003e75') || ($item['light_color'] != '' && $item['light_color'] != '3073ad') || ($item['links_color'] != '' && $item['links_color'] != '255593') || ($item['text_color'] != '' && $item['text_color'] != '4f4f4f')): ?> <img src="<?php echo $this->baseUrl(); ?>/images/check_mark.png" alt="DONE"/> <?php endif; ?> </td> <td class="center"> <?php if($item['image1_id'] && $item['image2_id'] && $item['image3_id']): ?><img src="<?php echo $this->baseUrl(); ?>/images/check_mark.png" alt="DONE"/><?php endif; ?> </td> <td class="center"> <?php if(!empty($item['twitter_user'])): ?><img src="<?php echo $this->baseUrl(); ?>/images/check_mark.png" alt="DONE"/><?php endif; ?> </td> <td class="center"> <?php if(!empty($item['facebook_id'])): ?><img src="<?php echo $this->baseUrl(); ?>/images/check_mark.png" alt="DONE"/><?php endif; ?> </td> <td class="center"> <?php if(!empty($item['phone_number'])): ?><img src="<?php echo $this->baseUrl(); ?>/images/check_mark.png" alt="DONE"/><?php endif; ?> </td> <td class="center"> <?php if($item['google_account']): ?><img src="<?php echo $this->baseUrl(); ?>/images/check_mark.png" alt="DONE"/><?php endif; ?> </td> <td class="center"> <?php if($item['video_made']): ?><img src="<?php echo $this->baseUrl(); ?>/images/check_mark.png" alt="DONE"/><?php endif; ?> </td> <td class="center"> <?php if($item['youtube_position']) { echo $item['youtube_position']; }; ?> </td> <td class="center"> <?php if(!empty($item['address'])): ?><img src="<?php echo $this->baseUrl(); ?>/images/check_mark.png" alt="DONE"/><?php endif; ?> </td> <td class="center"> <?php if($item['gmaps_status'] == 1): ?><img src="<?php echo $this->baseUrl(); ?>/images/icon-gmapspending.png" alt="Pending"/><?php elseif($item['gmaps_status'] == 2): ?><img src="<?php echo $this->baseUrl(); ?>/images/check_mark.png" alt="DONE"/><?php endif; ?> </td> <td class="center"> <?php if(!empty($item['ganalytics'])): ?><img src="<?php echo $this->baseUrl(); ?>/images/check_mark.png" alt="DONE"/><?php endif; ?> </td> <td class="center"> <?php if($item['online']): ?><img src="<?php echo $this->baseUrl(); ?>/images/check_mark_red.png" alt="Online!"/><?php endif; ?> </td> <td class="center"> <?php if($item['indexed']): ?><img src="<?php echo $this->baseUrl(); ?>/images/check_mark_red.png" alt="Online!"/><?php endif; ?> </td> <td class="center"> <?php if($item['gmap_position']) { echo $item['gmap_position']; }; ?> </td> <td class="center"> <?php if($item['google_position']) { echo $item['google_position']; }; ?> </td> </tr> <?php endforeach; ?> </table> <?php endif; ?> The print_r(count($this-paginator)); line is returning "0", and the $this-numOnline; line is returning 1. So it sees that there is one row in the websites table of the database, but it is not returning anything to page and listing out the rows in the websites table. Not sure if this is the paginator that is causing this cause it is returning 0 or something else I don't know about.

    Read the article

  • For Loop counting from 1 to n in a windows bat script

    - by raoulsson
    I need to run a windows command n times within a bat script file. I know how to do this in various programming languages but cannot manage to get it right on the windows command line :-( I would expect something like either for(int i = 0; i < 100; i++) { // do something } or even this (though not entirely seriously) 1.upto(100, { // do something }) Thanks! EDIT I can write a program in java, perl, c or whatever that will generate a bat script that looks like this for %%N in (1 2 3 4 5 6 7 8 9 10 11 12) do echo %%N and so on. Or even "better": echo 1 echo 2 echo 3 echo 4 echo 5 echo 6 echo 7 echo 8 echo 9 echo 10 echo 11 echo 12 and then execute it... But the thing is that I need a concise way to specify a range of numbers to iterate through within the script. Thanks!

    Read the article

  • TCP echo server

    - by khera-satinder
    I have written a code for TCP echo server code in C i.e. whatever I receive I have to send it back. I am also successful in doing so but I am facing a problem. Sometimes the packets that are received are not echoed back. For this I have introduced a delay after receiving and the no. of failures reduced but the problem still exists. Can someone suggest something? Later on I would like to run two server applications simultaneously on two different ports. Regards, Satinder Singh

    Read the article

  • Using jQuery to echo text

    - by susmits
    Is it possible to use jQuery to echo text in place of a script tag? More precisely, is there a way to accomplish <script type="text/javascript"> document.write("foo"); </script> ... without the use of document.write? I am not happy about using document.write after reading this. I am aware that I could alternatively do this: <span id="container"></span> <script type="text/javascript"> $("#container").text("foo"); </script> However, I'm interested to see if there's a way to do it without using a container element, preferably using jQuery. Thanks in advance!

    Read the article

  • php : echo"", print(), printf()

    - by marc-andre menard
    Is there a better way to output data to html page with PHP ? if i like to make a div with some var in php i will write something like that print ('<div>'.$var.'</div>); or echo "'<div>'.$var.'</div>'"; what is the PROPER way to do that ? or a better way, fill a $tempvar and print it once? like that: $tempvar = '<div>'.$var.'</div>' print ($tempvar); in fact, in real life, the var will be fill with much more !

    Read the article

  • jquery $.post returned data from php is empty

    - by vee
    hi, i'm using this code to post to a php page: var qreq = ".....myurl.php"; $.post(qreq, function(data){alert(data);}); in my PHP file i have this: ...... $prevtopic = $row["topic_id"]; echo $prevtopic; the alert comes up, but is blank. for some reason data is empty even though i'm echoing from the PHP file. i also tried just echoing "hi" but that didn't work either. what am i doing wrong? thanks.

    Read the article

  • Send the "ENTER" from a bash script

    - by Smat
    I am trying to create a bash script to simulate a mail attack to our mailserver. For this reason i want to create a bash script to send hundred of mails to our server, but when i launch the command: $telnet 192.168.12.1 25 <-- where 192.168.12.1 is the ip of our server The telnet session start and all the commands that i write later aren't executed. I also tried to create a second script to launch command on the telnet session after that this one are been created, but when i write from the second script: $echo -ne "EHLO domain.com\r\f" It print the command but doesn't do the ENTER so the command is not taken. Any idea?

    Read the article

  • Echo-ing Only Available Database Result

    - by Robert Hanson
    I have this Associative Array : $Fields = array("row0"=>"Yahoo ID", "row1"=>"MSN ID", "row2"=> "Gtalk ID"); on the other side, I have this SQL query : SELECT YahooID, MSNID, GTalkID From UserTable WHERE Username = '$Username' LIMIT 1; the result maybe vary, because some users only have Yahoo ID and some have others. for example if I have this result : $row[0] = NONE //means YahooID = NONE $row[1] = [email protected] $row[2] = [email protected] then how to have this as an output (echo) : MSN ID = [email protected] Gtalk ID = [email protected] since Yahoo ID is not exist, then the result will be MSN and Gtalk only. 'MSN ID' and 'Gtalk ID' is variable from Associative Array, while '[email protected]' and '[email protected]' from SQL result. thanks!

    Read the article

  • Changing find to echo

    - by waszak
    This is almost good find *.txt -print0 | xargs -0 rm -f And i want to have something like that echo *.txt ./zad3.sh | xargs -l rm -f First version is good because I can delete file with white spaces but I can't use my script to select file to delete. Second version I can select files but I can't delete file with white spaces. I want to find files with end on .txt and delete some of them. zad3.sh is a script wich is returning file name if i agree to delete it rm catch the name and delete it. It works only for file without white space and special characters. Second version is better but i cant put my script inside it. find *.txt -print0| xargs -0 ./zad3.sh |xargs rm -f it works almost but i cant pass arg to rm and part of my code Thx

    Read the article

  • Wordpress Template HTML CSS Layout Confusion

    - by Jess McKenzie
    I am having huge confusion with a template that I have purchased and I am trying to modify to handle a widget contact form. I am getting close with this but I have now muddled up the CSS or I have a feeling every page has a different CSS structure. The General Layout: What I Manage To Get: HTML View Source: <div id="innerright"> <div id="home" class="page"> <div id="homeslides"> <div class="welcomeslide"> <h1 class="large">Welcome</h1> </div> </div><!-- end home slides --> </div><!-- end page --> <div id="portfolio" class="page"> <div class="verticalline"> <div class="scrollprevnext"></div> </div> <div class="pageheader"> <h3><span>P</span>ortfolio</h3> </div><!--end pageheader --> <div id="portfolioscroller" class="scrollerenabledpage"> <div class="content"> <h5>Recent Work</h5> <ul class="thumb"> <li><a rel="precision_gallery" href="" title=""><img alt="" src="" /></a></li> </ul> </div> </div><!--end v scroll inner--> </div><!-- end page --> <div id="contact" class="page"> <div class="verticalline"> <div class="scrollprevnext"></div> </div> <div class="pageheader"> <h3><span>C</span>ontact</h3> </div><!--end pageheader --> <div id="contactscroller"> <h5>Get In Touch</h5> <div id="contactform">content</div> </div><!--end v scroll inner--> </div><!-- end page --> </div><!--end innerright--> CSS: CSS index.php: <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title><?php bloginfo('name'); ?></title> <link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri(); ?>/style.css" /> <link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri(); ?>/fancybox/jquery.fancybox-1.3.4.css" media="screen" /> <?php // jquery will be included by wp_head function as well as scripts and styles by third party plugins wp_head(); ?> <script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/plugins.js"></script> <script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/script.js"></script> <script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/fancybox/jquery.fancybox-1.3.4.pack.js"></script> <?php // background image if one has been set via options if (function_exists('get_option_tree')) { $background_image = get_option_tree('precision_background_image'); //$background_image = ''; $background_color = get_option_tree('precision_background_color'); if ($background_color != '') { echo '<style>body { background-color:'.$background_color.'; }</style>'; } } ?> <script type="text/javascript"> jQuery(document).ready(function($) { $('.page').each(function(index, element) { $(this).css('left', index * 500); }); <?php // if background is set via the OptionTree then load it first if ($background_image != '') { ?> $.vegas({ src:'<?php echo $background_image; ?>', fade:1000, complete:function() { $("#wrapper").fadeIn(1000); $("#bgpanel").fadeIn(1000); $('#mainslide').crossSlide( { speed: 15, fade: 1 }, [ <?php echo $slides; ?> ] ) $('#homeslides').bxSlider({ mode: 'fade', auto: true, controls:false, speed:1000, pause:5000 }); } }); <?php } else { // if no background has been set then fade-in the page ?> $("#wrapper").fadeIn(1000); $("#bgpanel").fadeIn(1000); $('#mainslide').crossSlide( { speed: 15, fade: 1 }, [ //ENTER YOUR MAIN SLIDESHOW IMAGES HERE\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ <?php echo $slides; ?> ] ) $('#homeslides').bxSlider({ mode: 'fade', auto: true, controls:false, speed:1000, pause:5000 }); <?php } ?> //BX SLIDER INNER PAGE SCROLLERS//////////////////////// $('.scrollerenabledpage').each(function(index, element) { $('#' + $(this).attr('id')).bxSlider({ mode: 'vertical', easing: 'easeInOutQuint', auto: false, controls: true, prevImage:'<?php echo get_template_directory_uri(); ?>/images/up.png', nextImage:'<?php echo get_template_directory_uri(); ?>/images/down.png', infiniteLoop: false, hideControlOnEnd: true, pager: true, pagerType:'short', pagerShortSeparator:'of', speed:800, }); }); //END BX SLIDER INNER PAGE SCROLLERS///////////////// $('#submit').click(function(e) { e.preventDefault(); $('form').submit(); }); // contact form $('form').submit(function(e) { $('#main').append('<img src="<?php echo get_template_directory_uri(); ?>/images/loader.gif" class="loaderIcon" alt="Loading..." />'); $.post("<?php bloginfo('wpurl'); ?>/wp-admin/admin-ajax.php", {action:'precision_contact_form_handler', uname:$('input#uname').val(), uemail:$('input#uemail').val(), ucomments:$('textarea#ucomments').val()}, function(data) { $('#main img.loaderIcon').fadeOut(1000); if (data.status == "success") { $('#response').html("Forum has been successfully submitted."); } else { if (data.response != '') { $('#response').html(data.response); } else { $('#response').html("An error occurred while submitting the form. Please try again."); } } }, "json"); return false; }); }); //hides contact form labels when a field gets focus function initOverLabels () { if (!document.getElementById) return; var labels, id, field; labels = document.getElementsByTagName('label'); for (var i = 0; i < labels.length; i++) { if (labels[i].className == 'overlabel') { id = labels[i].htmlFor || labels[i].getAttribute('for'); if (!id || !(field = document.getElementById(id))) { continue; } labels[i].className = 'overlabel-apply'; if (field.value !== '') { hideLabel(field.getAttribute('id'), true); } field.onfocus = function () { hideLabel(this.getAttribute('id'), true); }; field.onblur = function () { if (this.value === '') { hideLabel(this.getAttribute('id'), false); } }; labels[i].onclick = function () { var id, field; id = this.getAttribute('for'); if (id && (field = document.getElementById(id))) { field.focus(); } }; } } }; function hideLabel(field_id, hide) { var field_for; var labels = document.getElementsByTagName('label'); for (var i = 0; i < labels.length; i++) { field_for = labels[i].htmlFor || labels[i].getAttribute('for'); if (field_for == field_id) { labels[i].style.textIndent = (hide) ? '-1000px' : '0px'; return true; } } } window.onload = function () { setTimeout(initOverLabels, 50); }; </script> <?php if (function_exists('get_option_tree')) { $precision_font_family_1 = get_option_tree('precision_font_family_1'); ?> <link href='http://fonts.googleapis.com/css?family=<?php echo $precision_font_family_1; ?>' rel='stylesheet' type='text/css'> <?php } ?> <style> h1, h2 { font-family:<?php echo $precision_font_family_1; ?>; } </style> </head> <body> <div id="wrapper"> <div id="innerleft"> <div id="header"> <?php if (function_exists('get_option_tree')) { $site_logo = get_option_tree('precision_site_logo'); ?> <a href="/" title="<?php bloginfo('name');?>"><img src="<?php echo $site_logo; ?>" alt="<?php bloginfo('name');?>" /></a> <?php } ?> </div><!--end header--> <?php if (function_exists('get_option_tree')) { $precision_slideshow_image = get_option_tree('precision_slideshow_image'); } ?> <ul id="nav"><!--Navigation--> <?php //instead of using wp_nav_menu, we use wp_get_nav_menu_items so that we can store the data in array and re-use it again //wp_nav_menu(array('theme_location' => 'precision-main-menu', 'container' => 'false')); $slt_menuItems = wp_get_nav_menu_items( "precision-main-menu" ); $menusItems = array(); foreach ($slt_menuItems as $slt_menuItem) { $page_title = $slt_menuItem->title; $menuItem = new stdClass; $menuItem->title = $page_title; $menuItem->page_id = $slt_menuItem->object_id; $menusItems[] = $menuItem; ?> <li id="<?php echo strtolower($page_title); ?>nav"><a href="#<?php echo strtolower($page_title); ?>"><?php echo $page_title; ?></a></li> <?php } ?> </ul> <div id="socialMedia"> <ul class="social"> <?php if (function_exists('get_option_tree')) { $twitter_link = get_option_tree('precision_twitter_link'); $facebook_link = get_option_tree('precision_facebook_link'); $gplus_link = get_option_tree('precision_gplus_link'); $delicious_link = get_option_tree('precision_delicious_link'); $flickr_link = get_option_tree('precision_flickr_link'); $vimeo_link = get_option_tree('precision_vimeo_link'); $youtube_link = get_option_tree('precision_youtube_link'); $linkedin_link = get_option_tree('precision_linkedin_link'); ?> <!-- start linkedin icon --> <?php if($linkedin_link != ''){ ?> <li><a href="<?php echo $linkedin_link;?>" title="Follow <?php bloginfo('name'); ?> on Linkedin"><img src="<?php echo get_template_directory_uri();?>/images/social-icons/linkedin.png" width="49" height="64" alt="<?php bloginfo('name'); ?> Linkedin"/></a><li> <?php } ?> <!-- end linkedin icon --> <!--start twitter icon--> <?php if ($twitter_link != '') { ?> <li><a href="<?php echo $twitter_link; ?>" title="Follow <?php bloginfo('name'); ?> on Twitter"><img src="<?php echo get_template_directory_uri(); ?>/images/social-icons/twitter.png" width="49" height="64" alt="<?php bloginfo('name'); ?> Twitter" /></a></li> <?php } ?> <!--end twitter icon--> <!--start facebook icon--> <?php if ($facebook_link != '') { ?> <li><a href="<?php echo $facebook_link; ?>" title="Follow <?php bloginfo('name'); ?> on Facebook"><img src="<?php echo get_template_directory_uri(); ?>/images/social-icons/facebook.png" width="49" height="64" alt="<?php bloginfo('name'); ?> Facebook" /></a></li> <?php } ?> <!--end facebook icon--> <!--start google plus icon--> <?php if ($gplus_link != '') { ?> <li><a href="<?php echo $gplus_link; ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/social-icons/google_plus.png" width="16" height="16" alt="google+" /></a></li> <?php } ?> <!--end google plus icon--> <!--start delicious icon--> <?php if ($delicious_link != '') { ?> <li><a href="<?php echo $delicious_link; ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/social-icons/delicious.png" width="16" height="16" alt="delicious" /></a></li> <?php } ?> <!--end delicious icon--> <!--start flickr icon--> <?php if ($flickr_link != '') { ?> <li><a href="<?php echo $flickr_link; ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/social-icons/flickr.png" width="16" height="16" alt="flickr" /></a></li> <?php } ?> <!--end flickr icon--> <!--start vimeo icon--> <?php if ($vimeo_link != '') { ?> <li><a href="<?php echo $vimeo_link; ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/social-icons/vimeo.png" width="16" height="16" alt="vimeo" /></a></li> <?php } ?> <!--end vimeo icon--> <!--start youtube icon--> <?php if ($youtube_link != '') { ?> <li><a href="<?php echo $youtube_link; ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/social-icons/youtube.png" width="16" height="16" alt="youtube" /></a></li> <?php } ?> <!--end youtube icon--> <?php } ?> </ul> </div> </div><!--end innerleft--> <div id="innerright"> <?php if (function_exists('get_option_tree')) { $precision_home_page_option = get_option_tree('precision_home_page'); $precision_home_page = strtolower(get_the_title($precision_home_page_option)); if ($precision_home_page == '') { $precision_home_page = 'home'; } $precision_contact_page_option = get_option_tree('precision_contact_page'); $precision_contact_page = strtolower(get_the_title($precision_contact_page_option)); if ($precision_contact_page == '') { $precision_contact_page = 'contact'; } } foreach ($menusItems as $menuItem) { ?> <div id="<?php echo strtolower($menuItem->title); ?>" class="page"> <?php if (strtolower($menuItem->title) == $precision_home_page) { ?> <div id="homeslides"> <?php $page_data = get_page($menuItem->page_id); $content = apply_filters('the_content', $page_data->post_content); echo $content; ?> </div><!-- end home slides --> <?php } else { ?> <div class="verticalline"> <div class="scrollprevnext"></div> </div> <div class="pageheader"> <h3><span><?php echo substr($menuItem->title, 0, 1); ?></span><?php echo substr($menuItem->title, 1); ?></h3> </div><!--end pageheader --> <?php $classes = ''; if (strtolower($menuItem->title) == $precision_contact_page) { ?> <div id="<?php echo strtolower($menuItem->title); ?>scroller"> <?php $page_data = get_page($menuItem->page_id); $content = apply_filters('the_content', $page_data->post_content); echo $content; ?> </div><!--end v scroll inner--> <?php } else { $classes = 'scrollerenabledpage'; ?> <div id="<?php echo strtolower($menuItem->title); ?>scroller" class="<?php echo $classes; ?>"> <?php $page_data = get_page($menuItem->page_id); $content = apply_filters('the_content', $page_data->post_content); echo $content; ?> </div><!--end v scroll inner--> <?php } } ?> </div><!-- end page --> <?php } ?> </div><!--end innerright--> <div id="footer"> <p>&copy; <a href="/"><?php bloginfo('name');?></a> | <?php echo date('Y');?></p> </div> </div><!--end wrapper--> </div> <!--Live Preview--> </body> </html>

    Read the article

  • BASH echo write mysql input

    - by jmituzas
    Have a bash menu where variables write to file for mysql input. heres what I have: echo "CREATE DATABASE '$mysqldbn'; #GRANT ALL PRIVILEGES ON *.* TO '$mysqlu'@'$myhost' IDENTIFIED BY '$mysqlup' WITH GRANT OPTION; GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON '$mysqldbn'.* TO '$mysqlu'@'$myhost' IDENTIFIED BY '$mysqlup'; GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON '$mysqldbn'.* TO '$mysqlu'@'$myip' IDENTIFIED BY '$mysqlup'; GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON '$mysqldbn'.* TO '$mysqlu'@'localhost' IDENTIFIED BY '$mysqlup'; GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES< LOCK TABLES on '$mysqldbn'.* TO '$mysqlu'@'$rip' IDENTIFIED BY '$mysqlup';" > nmysql.db mysql -u root -p$mypass < nmysql.db problem is to get variables to show I had to put them in single quotes, the single quotes show up as I want for instances like '$mysqlu'@'localhost'. But how can I remove the quotes and still get to use the variable in the instance like, CREATE DATABASE '$mysqldbn' ? Double quotes wont work either, I am at a loss. Thanks in advance, Joe

    Read the article

  • PHP issue json_decode echo array

    - by dfdf
    <?php $string = file_get_contents("http://www.reddit.com/r/news.json"); $array = json_decode($string, true); echo $array['data'][0]['children'][0]['data'][0]['title'][0]; ?> I've got a problem- the code doesn't echo anything. I'm kinda new to json_decode, so any help is appreciated :-) Edit: As a response to a comment, here's what print_r results to: Array ( [kind] => Listing [data] => Array ( [modhash] => [children] => Array ( [0] => Array ( [kind] => t3 [data] => Array ( [domain] => syracuse.com [banned_by] => [media_embed] => Array ( ) [subreddit] => news [selftext_html] => [selftext] => [likes] => [secure_media] => [link_flair_text] => [id] => 1qdtqr [secure_media_embed] => Array ( ) [clicked] => [stickied] => [author] => cadencehz [media] => [score] => 1552 [approved_by] => [over_18] => [hidden] => [thumbnail] => [subreddit_id] => t5_2qh3l [edited] => [link_flair_css_class] => [author_flair_css_class] => [downs] => 978 [saved] => [is_self] => [permalink] => /r/news/comments/1qdtqr/thousands_defend_grocery_store_employee_with/ [name] => t3_1qdtqr [created] => 1384215998 [url] => http://www.syracuse.com/news/index.ssf/2013/11/thousands_come_to_defense_of_clay_wegmans_employee_with_aspergers_syndrome_after.html#incart_m-rpt-2 [author_flair_text] => [title] => Thousands defend grocery store employee with Asperger's syndrome after customer yells at him for being too slow [created_utc] => 1384187198 [ups] => 2530 [num_comments] => 401 [visited] => [num_reports] => [distinguished] => ) ) [1] => Array ( [kind] => t3 [data] => Array ( [domain] => bostonherald.com [banned_by] => [media_embed] => Array ( ) [subreddit] => news [selftext_html] => [selftext] => [likes] => [secure_media] => [link_flair_text] => [id] => 1qddl6 [secure_media_embed] => Array ( ) [clicked] => [stickied] => [author] => boxofrain [media] => [score] => 2086 [approved_by] => [over_18] => [hidden] => [thumbnail] => [subreddit_id] => t5_2qh3l [edited] => [link_flair_css_class] => [author_flair_css_class] => [downs] => 2556 [saved] => [is_self] => [permalink] => /r/news/comments/1qddl6/motorcycle_stolen_in_1961_found_is_recovered_and/ [name] => t3_1qddl6 [created] => 1384199801 [url] => http://bostonherald.com/news_opinion/offbeat_news/2013/11/man_glad_stolen_motorcycle_found_after_46_years [author_flair_text] => [title] => Motorcycle stolen in 1961 found is recovered and will be returned to it 73 year old owner. [created_utc] => 1384171001 [ups] => 4642 [num_comments] => 141 [visited] => [num_reports] => [distinguished] => ) ) [2] => Array ( [kind] => t3 [data] => Array ( [domain] => hosted.ap.org [banned_by] => [media_embed] => Array ( ) [subreddit] => news [selftext_html] => [selftext] => [likes] => [secure_media] => [link_flair_text] => [id] => 1qe6gp [secure_media_embed] => Array ( ) [clicked] => [stickied] => [author] => donkey-kick [media] => [score] => 415 [approved_by] => [over_18] => [hidden] => [thumbnail] => [subreddit_id] => t5_2qh3l [edited] => [link_flair_css_class] => [author_flair_css_class] => [downs] => 334 [saved] => [is_self] => [permalink] => /r/news/comments/1qe6gp/atheist_mega_churches_take_hold_in_the_us_and/ [name] => t3_1qe6gp [created] => 1384224670 [url] => http://hosted.ap.org/dynamic/stories/U/US_ATHEIST_MEGACHURCH?SITE=AP&amp;SECTION=HOME&amp;TEMPLATE=DEFAULT&amp;CTIME=2013-11-10-17-03-15 [author_flair_text] => [title] => Atheist Mega Churches take hold in the US and around the world. [created_utc] => 1384195870 [ups] => 749 [num_comments] => 368 [visited] => [num_reports] => [distinguished] => ) ) [3] => Array ( [kind] => t3 [data] => Array ( [domain] => abcnews.go.com [banned_by] => [media_embed] => Array ( ) [subreddit] => news [selftext_html] => [selftext] => [likes] => [secure_media] => [link_flair_text] => [id] => 1qdie4 [secure_media_embed] => Array ( ) [clicked] => [stickied] => [author] => Hoosier_made [media] => [score] => 984 [approved_by] => [over_18] => [hidden] => [thumbnail] => [subreddit_id] => t5_2qh3l [edited] => [link_flair_css_class] => [author_flair_css_class] => [downs] => 400 [saved] => [is_self] => [permalink] => /r/news/comments/1qdie4/abc_news_amy_robach_has_mammogram_live_on_gma/ [name] => t3_1qdie4 [created] => 1384206209 [url] => http://abcnews.go.com/blogs/health/2013/11/11/abc-news-amy-robach-reveals-breast-cancer-diagnosis/ [author_flair_text] => [title] => ABC News’ Amy Robach has mammogram live on GMA. Results Reveal Breast Cancer Diagnosis. [created_utc] => 1384177409 [ups] => 1384 [num_comments] => 130 [visited] => [num_reports] => [distinguished] => ) ) // ECT... I CUT HERE BECAUSE IT WENT ON FOR A WHILE [after] => t3_1qdinr [before] => ) ) Here's the url to the exact output, I had to trim the code to fit the character limit so maybe there's something I messed up ! :P Okay: Link goes here...

    Read the article

  • Cannot see echo message but my localhost works

    - by Sean
    This is my very first php code and I can't seem to get it to work. (I'm using Eclipse) <html> <body> <?php echo 'Hello World!'; $txt = "I <3 you!"; $num = 19; ?> </html> </body> When I run it (http://localhost/Assignment3.0/index.php), I get: Not Found The requested URL /Assignment3.0/index.php was not found on this server. Apache/2.2.22 (Ubuntu) Server at localhost Port 80 But when I run this (http://localhost/), I get: It works! This is the default web page for this server. The web server software is running but no content has been added, yet. So what could be the problem? Where's my "Hello World!"? Also, for Stackoverflow formatting, how do I start a new line w/o adding a blank line in between?

    Read the article

  • RSS feed created with PHP only shows the title in the feed reader

    - by James Simpson
    I am using the following PHP code to generate the XML for an RSS feed, but it doesn't seem to be working correctly. No short description is displayed in the feed reader, all I see is the title of the article. Also, all of the articles say they were published at the same time. This is the first time I have tried to setup an RSS feed, so I'm sure I've made several stupid mistakes. $result = mysql_query("SELECT * FROM blog ORDER BY id DESC LIMIT 10"); $date = date(DATE_RFC822); header('Content-type: text/xml'); echo ("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); echo ("<rss version=\"2.0\">\n"); echo ("<channel>\n"); echo ("<lastBuildDate>$date</lastBuildDate>\n"); echo ("<pubDate>$date</pubDate>\n"); echo ("<title>my website name</title>\n"); echo ("<description><![CDATA[the description]]></description>\n"); echo ("<link>http://my-domain.com</link>\n"); echo ("<language>en</language>\n"); $ch=100; while ($a = mysql_fetch_array($result)) { $headline = htmlentities(stripslashes($a['subject'])); $posturl = $a[perm_link]; $content = $a['post']; $date = date(DATE_RFC822, $a['posted']); echo ("<item>\n"); echo ("<title>$headline</title>\n"); echo ("<link>$posturl</link>\n"); echo ("<description><![CDATA[$content]]></description>\n"); echo ("<guid isPermaLink=\"true\">$posturl</guid>\n"); echo ("<pubDate>$date2</pubDate>\n"); echo ("</item>\n"); } echo ("</channel>\n"); echo ("</rss>\n");

    Read the article

  • How to simplify my country select menu PHP/mysql

    - by user342391
    I have a select menu that displays countries. It looks at the DB and judging by the value in the db shows the option as selected. Is there a simpler way off doing this than: if ($country == 'AG') {echo '<option value="AG" selected="selected">Antigua</option>';} else {echo '<option value="AG">Antigua</option>';}; if ($country == 'AR') {echo '<option value="AR" selected="selected">Argentina</option>';} else {echo '<option value="AR">Argentina</option>';}; if ($country == 'AM') {echo '<option value="AM" selected="selected">Armenia</option>';} else {echo '<option value="AM">Armenia</option>';}; if ($country == 'AW') {echo '<option value="AW" selected="selected">Aruba</option>';} else {echo '<option value="AW">Aruba</option>';}; if ($country == 'AU') {echo '<option value="AU" selected="selected">Australia</option>';} else {echo '<option value="AU">Australia</option >';}; if ($country == 'AT') {echo '<option value="AT" selected="selected">Austria</option>';} else {echo '<option value="AT">Austria</option>';}; if ($country == 'AZ') {echo '<option value="AZ" selected="selected">Azerbaijan</option>';} else {echo '<option value="AZ">Azerbaijan</option>';}; if ($country == 'BS') {echo '<option value="BS" selected="selected">Bahamas</option>';} else {echo '<option value="BS">Bahamas</option>';}; if ($country == 'BH') {echo '<option value="BH" selected="selected">Bahrain</option>';} else {echo '<option value="BH">Bahrain</option>';}; There are a lot of countries and doing this would be madness wouldn't it????

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >