# Easy way to individually adjust the justification of text in a table?

I have a simple table and want to center only the titles of each column, how can I individually center them ?

I tried \centering{} but this only works for the first column.

-
how about using a multicolumn? – cmhughes Apr 11 '13 at 23:45
\multicolumn{1}{c}{title} – Gonzalo Medina Apr 11 '13 at 23:45
\centering works the same way in a table as out of it, it works in vertical mode (do p columns) but not in horizontal (LR) modeso \mbox or table l columns. – David Carlisle Apr 11 '13 at 23:55
@cmhughes I already have the table set out, how do I incorporate \multicolumn with the table ? Do I have to change everything ? :\ – Razor Apr 12 '13 at 0:31
just the bit you want to change- see Gonzalo's comment :) – cmhughes Apr 12 '13 at 0:31

Use \multicolumn, as advised in the comments. Here is a baby example:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{tabular}{ll}
\multicolumn{1}{c}{title~1} & \multicolumn{1}{c}{title~2}\\
foofoofoo & barbarbar \\
foofoofoo & barbarbar \\
foofoofoo & barbarbar \\
\end{tabular}
\end{document}

-