echo

PHP mysql echo data

<?php // query db $sql = "SELECT category.id as category_pk, category_id, products.* from category, products WHERE products.id = category.category_id AND category.id = category_id"; // from category get id if ($result = mysql_query($sql)) { if (mysql_num_rows($result)) { $row = mysql_fetch_assoc($result); ...

Last "&" problem with "echo" in php?

I am print an string as below Code: echo "&words=".$rs['pw']."&"; Output: &words=Help|Good Notice that "&" is not printed. But when I am giving "space" after "&" then it gets printed as below Code: echo "&words=".$rs['pw']."& "; Output: &words=Help|Good& Now "&" is printed. Why its happening and whats the reason for thi...

Echo problem with speakers in flash/red5 application for two-way video conferencing

I just tried the below code, and it works fine to reduce the echo on head phones. But the problem of echo remains as it is in case of speakers. public var intCountMilliSec:int = 0; public var intLastActivityLevel:int = 0; public var intLastLowestActivityLevel:int = 100;//07-Dec-09 private function CancelEcho(e:TimerEvent):void...

Automate escape of double quotes

I have the following variable being dynamically set by user generated content: $variable = <a href="http://www.mysite.com/article"&gt;This Article</a>; When this variable is set, I then echo it as such echo $variable; I know that as is, this wouldn't be valid because I would need to escape the double quotes etc. I'm a total beginn...

Can't load text from database inside Tiny MCE Editor

Hi all, I'm using the tiny mce editor in my website and I want to load some text from database in the text area that uses tinymce. The javascript configuration for the editor is the following: <script type="text/javascript"> tinyMCE.init({ mode : "textareas", theme : "advanced", editor_selector : "mceAdvanced", plugins ...

PHP, Don't Echo Out cURL

When i use this code, $ch = curl_init($url); $statuses = curl_exec($ch); curl_close($ch); I am returned what i want, but if i just use that - $statuses is echoed out onto the page, how can i stop this? ...

sample iphone code for delay and echo

Does anyone know where i can find sample code to apply processing to audio to simulate an echo or delay effect? I am currently using AVAudioPlayer to play samples and would like to layer the effects on top. All of the references I have seen so far are very generic and related to Audio Units. ...

Need ideas for an algorithm that generates an "echo text" from a given input.

After having some fun in a chatbox on a certain website I had an interesting idea. What would be an algorithm that, given some input text, would generate an "echo" text from it. That is, it generates the echo that you would hear if you shouted the input text in a large empty cave. For example: Input text: Hello! Output text: Hello! ...

Bash: Why is echo adding extra space?

I get: $ echo -e "D"{a,b,c}".jpg\n" Da.jpg Db.jpg Dc.jpg Note: The extra spaces before Db and Dc on the 2nd and 3rd line of the output. Why are these there? Thanks, Dan Edit: Since my actual objective had spaces in it (which I should have written originally): echo -e "Name"{,.}" "{-,}"extra"{,so}" 5v5 "{one,two,No\ four}{,!,\!\!...

Zend MVC - I echo some test debug output but it seems to be suppresed and does not show

I am developing a Zend MVC application. Sometimes I like to echo some text just for quick and dirty debugging. e.g <?php class MyClass {} echo('hello world - yes this script is included'); I can echo 'debug-text' in my bootstrap> But, when text is echoed in my model or controllers it is NOT being rendered in the output. I am using Z...

How do I text-align:center php echo text in Firefox?

I don't see this question answered anywhere else here. Here's the code: <div class="copyright"> <h2 class="copyright unselectable" onselectstart="return false"> &copy;&nbsp;2009&nbsp;-&nbsp;<?=date("Y") ?>&nbsp;<?=PROJECT_NAME?> </h2> </div> It's aligning right in IE but not FF or Safari. It seems to not be taking into account the s...

PowerShell "echo on"

This is a duplicate of http://serverfault.com/questions/102098/powershell-script-showing-commands-run. I thought it would be more appropriate to ask this question here. I am playing around with PowerShell scripts and they're working great. However, I am wondering if there is any way to also show all the commands that were run, just as ...

Store LINE in a string in bash

Hi, I have a bash script which reads lineas filename=$ while read LINE do ...... done < $filename I wonder how could I store $LINE in a string (my_string) so for each line I can do echo $my_thing" "$my_string I tried several things but when I print with echo or printf, $LINE deletes everything before it Tjans ...

So Echo isn't echoing

So I've got all of this really neato PHP code and I've started doing some reuse with functions out of necessity. I'm debugging, trying to figure out why I can't delete comments on my website while I'm deleting folder (because who wants orphaned comments?) So I have a call to deletefolder( $parent) inside a file called deletefolder.php....

Calling Echo inside a function pre-pends echo string to return value in Powershell

Hey guys, I'm a Powershell noob and seem to keep getting caught on little weird behaviors like this. Here is some test code: function EchoReturnTest(){ echo "afdsfadsf" return "blah" } $variable = EchoReturnTest echo ("var: " + $variable) Running this script generates this as output: "var: afdsfadsf blah" Why does the...

How do I echo the session name in a foreach loop in PHP?

I am looping through my session variables. I have been able to echo the session values, but I would also like to echo the session name that corresponds with that value. How do I echo out the session variable name each time it loops? This is the code I currently have: foreach($_SESSION as $value) { echo 'Current session variable i...

Acoustic Echo Cancellation in Flash/Flex using native libraries

Hello, I have to implement AEC in Flex video conferencing application. I know that it can not be done directly in Flash. I'm thinking to write a native application or library that will do AEC outside Flex. As far I know Adobe Connect Pro is using some external library that do AEC. I'd like to follow this direction and do something simi...

How do I echo dynamic session variables in PHP?

Order Page: On this page, customers can choose to add business card orders with different foreign languages and other options. When the user clicks on a button to add an additional card, javaScript adds a series of form fields and in order to give them unique name attributes, I am simply adding a counter variable at the end of the name ...

How to echo something inside the head section of a page using PHP

I want to echo a stylesheet inside the head section of a web page. Right now when I do this: if($browser == "Opera") { echo "<link type='text/css' rel='stylesheet' src='/opera.css' media='screen' />"; } it does echo the style sheet in the source code and not the page itself which is good but it doesn't echo it inside the <head></h...

echo prints out -e inside script

when I run it in the terminal (bash) echo -e ."\c" prints out . and suppresses the newline. When I run the following script (all the code) echo -e ."\c" echo -e ."\c" it prints out .. and suppresses the newlines. when I run it inside a script with the shebang (!#/bin/sh), it prints out -e . -e . and suppresses the newline. Why? ...