PHP embedding functions inside strings?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting PHP embedding functions inside strings?
# 8  
Old 08-30-2012
OK hold it. What I was looking to do before was reading in an HTML file, make transformations to it in a PHP file, then print the resultant HTML.

I didn't want to mix the HTML and PHP into the same file because I was afraid you wouldn't be able to edit the HTML/PHP hybrid file with an HTML editor like MS Word (where you edit the HTML document as if it's a word document). But it looks like I might be wrong. Looks like Word is ignoring the PHP.

Ultimately I want everything to display in a browser, and the PHP is not being ignored there which is good.

---------- Post updated at 08:13 PM ---------- Previous update was at 07:47 PM ----------

Nevermind it's not ignoring the PHP

Last edited by stevensw; 08-29-2012 at 11:58 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to execute functions or initiate functions as command line parameters for below requirement?

I have 7 functions those need to be executed as command line inputs, I tried with below code it’s not executing function. If I run the ./script 2 then fun2 should execute , how to initiate that function I tried case and if else also, how to initiate function from command line if then... (8 Replies)
Discussion started by: saku
8 Replies

2. UNIX for Advanced & Expert Users

Embedding code into ssh keys

Hi Its been a long time since I worked with ssh keys containing embedded shell commands and cannot remember how it is done. Does anyone know of any sites that have a good tutorial on the subject? I'm not having much luck searching Google for it. Incidentally, searching this forum for the... (6 Replies)
Discussion started by: steadyonabix
6 Replies

3. Shell Programming and Scripting

Difficulty embedding variable within AWK

Hi, I am working on a parsing script but cannot figure out how to accomplish this. Here is a simplified version of the script: #!/bin/bash DS=$1 DS=`expr $DS \* 2` DS=`expr $DS + 7` cat $FILENAME | awk '/<row><v> +/' | awk '{printf("%.0f %.0f\n", $6, $9)}' The problem is that I want the... (2 Replies)
Discussion started by: Nisrak
2 Replies

4. Shell Programming and Scripting

Embedding HTML in Perl script

My webpage is hosted from perlscript(homepage.pl), i want to add piece of html code in the footer of the homepage. I simply pasted the html code at the end of the perl script as below... ======================================================== close(OUTSQL); ... (4 Replies)
Discussion started by: paventhan
4 Replies

5. UNIX Desktop Questions & Answers

Embedding file output into a script

Hello. I found a Unix script on this site that calculates a date that is 2 months earlier from today. I'm using that script and writing the value to a file called 2monthsago.txt. I want to use that value in another script. Below is my attempt at doing that and the results. My Script: ... (1 Reply)
Discussion started by: Colel2
1 Replies

6. Shell Programming and Scripting

CSH: Concatenating Strings, how to add new line character and functions?

Hello, I'm trying to run a program on a directory (traverse sub dirs too) through my csh script. Arrays support in CSH is appalling, something like associative arrays would have helped me do this so much easier. Anyway, I want to hold some details extracted from the program and then at the... (0 Replies)
Discussion started by: ragabonds
0 Replies

7. Shell Programming and Scripting

Embedding a command with SSH

Hi I am trying to run a script centrally that will go out and set the network management ip address on all my Sun boxes running Solaris. We have decided that the network management address will be the boxes main IP address but the first octet as a 172 rather than a 10, so for example ifconfig -a... (2 Replies)
Discussion started by: hcclnoodles
2 Replies

8. Programming

Embedding xnest in C code

I hope I am posting this in the right section. I have c file that is using the motif GUI toolkit to draw widgets and things of that sort. I also have another program that runs with xnest. I need to figure out a way to place that xnest program in my c code so that it exists in the window that the... (4 Replies)
Discussion started by: lesnaubr
4 Replies

9. Shell Programming and Scripting

Embedding Perl construct in ksh...

Hi, I have an embedded Perl construct in a korn script. However, I cannot seem to access the shell variables that were declared outside this Perl section. This is how my script is written....I have also tried back-ticks where I assign the shell variable to my local perl variable, still... (1 Reply)
Discussion started by: svetlur
1 Replies
Login or Register to Ask a Question
DATETIME.GETTIMESTAMP(3)						 1						  DATETIME.GETTIMESTAMP(3)

DateTime::getTimestamp - Gets the Unix timestamp

       Object oriented style

SYNOPSIS
public int DateTime::getTimestamp (void ) DESCRIPTION
int DateTimeImmutable::getTimestamp (void ) int DateTimeInterface::getTimestamp (void ) Procedural style int date_timestamp_get (DateTimeInterface $object) Gets the Unix timestamp. PARAMETERS
This function has no parameters. RETURN VALUES
Returns the Unix timestamp representing the date. EXAMPLES
Example #1 DateTime.getTimestamp(3) example Object oriented style <?php $date = new DateTime(); echo $date->getTimestamp(); ?> Procedural style <?php $date = date_create(); echo date_timestamp_get($date); ?> The above examples will output something similar to: 1272509157 NOTES
Using U as the parameter to DateTime.format(3) is an alternative when using PHP 5.2. SEE ALSO
DateTime.setTimestamp(3), DateTime.format(3). PHP Documentation Group DATETIME.GETTIMESTAMP(3)