Omgili - forum search, search forums  
  

Discussions about echo regular

Displaying 1 - 10 out of 17,088 discussions.  
RSS Feed Options
Time Frame: (Any time)   Minimum number of replies: (2)   Minimum number of discussing users: (0)
  |  

Page: 1   2   3   4   5   6   7   8   9   10  
Keep this page open to be updated with the newest discussions automatically.
I often find this in scripts (and, I have to admit, write it myself): a=`echo $x | sed "s/foo/bar/"` or if echo $x | grep foo then ... fi Consider "foo" to include some regex stuff. I feel that there should be - and most likely is - a better way to phrase...
Started by on , 4 posts by 4 people.  
Unless you assume a specific shell....
Sed 's/foo/bar/' <<< "foobie" grep 'this' <<< need it.
Fi Where foo is a regular expression.
Fi Consider using: if [ $x =~ foo ] then ...
Be Instead of: if echo $x | grep foo then ...
I have a simple if-else statement--if true, I'd like it to echo this content: <div id="login"> <h2>Login</h2> <div class="box"> <form method="POST" action="index.php/login"> Username/Email:<br /> <input type="text...
Started by on , 8 posts by 8 people.  
Another option would be to use output....
If(true) { ?> Regular HTML Here <?php } else { ?> Regular HTML Here <?php } You can break out of PHP at any time using the '?> it.
You can simply break out of PHP in the if/else statement .
Hi, We write a lot of code to htaccess but what is the best method to debug other than refreshing the page ? Is there some way that I can write it out to a file ? or is there some echo/print function ? Simply how do i know what my $1 $2 $3 is ?
Started by on , 3 posts by 3 people.  
Try these: RewriteLog "/myfolder/mylogfile.log" RewriteLogLevel 3 These are just Regular.
Ask your Facebook Friends
Hi, I wonder the general rule to use regular expression in if clause in bash? Here is an example $ gg=svm-grid-ch $ if [[ $gg == *grid* ]] ; then echo $gg; fi svm-grid-ch $ if [[ $gg == ^....grid* ]] ; then echo $gg; fi $ if [[ $gg == ....grid* ]] ; then...
Started by on , 6 posts by 6 people.  
Check http://tldp.org/LDP/abs represents a sequence of zero or more characters: if [[ $gg == ????grid* ]] ; then echo $gg; fi When using a regular expression, a dot represents....
If [[ $gg =~ ^....grid.* ]] Use =~ for regular expression.
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...
Started by on , 9 posts by 9 people.  
Printf() is a direct analogy....
Most PHP code that I've seen uses echo .
The only difference between echo and print in PHP the choice between echo and print pretty much comes down to style.
echo $var; Perhaps I'm missing something.
Hi all :) I'm currently writing sort of a download manager and I was asking myself if that was possible: if($ext == ('zip' || 'png')) { echo "Is it possible ?" } It returns true everytime, so I guess it's not possible. But do you have an idea about how...
Started by on , 9 posts by 9 people.  
If(preg_match("/^(zip|png)$/", $ext) { echo “It is possible!” } Related question: Checking for file-extensions in PHP with Regular expressions You could go' echo "It is possible"; break....
You can use regular expressions, e.g.
I'm writing a JavaScript application which should let the user to load & save files in his/her PC. To do so, I need a basic server used only to echo loaded and saved files between the client and the server, since JavaScript doesn't have direct access ...
Started by on , 5 posts by 5 people.  
Files to a "dumb" secondary web-server, and retrieving them as regular files, it's probably better.
I have the following line: <?php echo $this->__("mytext");?>somesometext")moretext and I need a regular expression to grab 'mytext'. The best I could come up with is: /\$this->__\([\'"](.*)[\'"]\)/ but in this case it returns: mytext");?>...
Started by on , 4 posts by 4 people.  
Better use PHP’s ability to parse its own code with token_get_all , step through the... .
/\$this->__\([\'"](.*?)[\'"]\)/ The ? makes the * quantifier ungreedy.
The ? switches the match-mode to ungreedy.
This->__\([\'"](.*?)[\'"]\)/ should work.
The PHP short tag <?= $var ?> has been deprecated for a while. Almost all PHP frameworks use the long form <?php echo $var ?> (e.g., symphony , Yii , Kohana ) Smarty is a famous PHP template engine which supports a shorter form {$var} Template...
Started by on , 9 posts by 9 people.  
In my foreach ($k as $v) { ?> <option value="<?php echo htmlentities($v['value']); ?>"><?php echo htmlentities($v['label']); ....
With it's own quirks to learn in order to accomplish the same thing with regular PHP.
Hi Guys ive tried to search for this answer all morning, but with no luck, all i want to do is match [slideshow or [gallery with the included [ bracket.. code as follows. $gallery = get_post_meta($post->ID, 'gallery', true); if (preg_match("|^/[slideshow...
Started by on , 3 posts by 3 people.  
("|^\[slideshow|", $gallery) if (preg_match("/^\[slideshow/", $gallery)) { echo "Slideshow was forund"; } else if (preg_match("/^\[nggallery/", $gallery)) { echo "Gallery was found"; } else { echo "No Match.
Page: 1   2   3   4   5   6   7   8   9   10  

Related Message Boards & Forums

  • Stack Overflow
  • Server Fault
  • Super User
More Information


Forum Search About Omgili Help Plugins Forum/Board Owners Privacy

i
In Title
In Topic
In Reply
Exclude
Boost